Skip to content

Commit

Permalink
[JS] Allow comments near default values
Browse files Browse the repository at this point in the history
  • Loading branch information
borela committed Aug 5, 2018
1 parent 8271f9d commit a121173
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion syntaxes/fjsx15/function/parameter/simple.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ contexts:
(?=
\s*\??
\s*{{type}}?
(?:\s*/\*.*?\*/)?
\s*=(?!\s*>)
)
scope: variable.parameter.function.js.fjsx15
Expand All @@ -118,16 +119,21 @@ contexts:
scope: variable.parameter.function.js.fjsx15
set: optional-modifier-and-type

comment-no-pop:
- include: Packages/Naomi/syntaxes/fjsx15/comment.no-pop.sublime-syntax

expression:
- include: Packages/Naomi/syntaxes/fjsx15/expression.sublime-syntax

optional-default-value:
- meta_scope: meta.function.parameter.optional.js.fjsx15
- include: comment-no-pop
- match: (?=(?>[,;:)\]}]|=>))
pop: true
- match: (?==)
set: expression
push: expression

optional-modifier-and-type:
- include: comment-no-pop
- include: Packages/Naomi/syntaxes/flow1/optional-modifier.no-pop.sublime-syntax
- include: Packages/Naomi/syntaxes/flow1/optional-associated-type.sublime-syntax

0 comments on commit a121173

Please sign in to comment.