File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -631,14 +631,33 @@ contexts:
631631 pop : 1
632632
633633 recipe-content-modifiers :
634- - match : ^\s+((@)|(-)(@)|(-)|(@)(-))(?!-)
634+ - match : |
635+ (?x) # Allow whitespace/comments in regex for clarity
636+ (?:
637+ (@)(\?) # @?
638+ | (\?)(@) # ?@
639+ | (@)(-) # @-
640+ | (-)(@) # -@
641+ | (@) # @ alone
642+ | (-) # - alone
643+ | (\?) # ? alone
644+ | ([-\?@]+) # Any other combinations are invalid
645+ )
646+ (?![-?@]) # Ensure no more modifiers follow (prevents --- or ??)
635647 captures:
636- 2 : storage.modifier.quiet.just
637- 3 : storage.modifier.ignore-error.just
648+ 1: storage.modifier.quiet.just
649+ 2: storage.modifier.exit-if-one.just
650+ 3: storage.modifier.exit-if-one.just
638651 4: storage.modifier.quiet.just
639- 5 : storage.modifier.ignore-error .just
640- 6 : storage.modifier.quiet .just
652+ 5: storage.modifier.quiet .just
653+ 6: storage.modifier.ignore-error .just
641654 7: storage.modifier.ignore-error.just
655+ 8: storage.modifier.quiet.just
656+ 9: storage.modifier.quiet.just
657+ 10: storage.modifier.ignore-error.just
658+ 11: storage.modifier.exit-if-one.just
659+ 12: invalid.illegal.just
660+ pop: 1 # Only consume the first run of space-separated sigil characters
642661 - include : else-pop
643662
644663 recipe-content-interpolations :
Original file line number Diff line number Diff line change 7777# ^ storage.modifier.ignore-error.just
7878# ^ storage.modifier.quiet.just
7979
80+ e :
81+ ?@echo " hi"
82+ # ^ storage.modifier.exit-if-one.just
83+ # ^ storage.modifier.quiet.just
84+
85+ # ? and - cannot be used together
86+ f :
87+ ?-echo " hi"
88+ # ^^ invalid.illegal.just
89+
90+ # Duplicates are sent to the shell, which will be invalid
91+ g :
92+ @ @echo " hi"
93+ # ^^ invalid.illegal.just
94+
95+
8096line-prefix-for-default-shell-only :
8197 #!/ usr/ bin/ sh
8298 - echo " hi"
You can’t perform that action at this time.
0 commit comments