Skip to content

Commit

Permalink
[FJSX15] Make semicolon optional in some statements and expressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
borela committed Oct 5, 2016
1 parent 150ef6b commit 2f29d0d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
3 changes: 1 addition & 2 deletions syntaxes/fjsx15/expression.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ variables:
contexts:
main:
- include: Packages/Naomi/syntaxes/fjsx15/class.sublime-syntax
- include: Packages/Naomi/syntaxes/fjsx15/interface.sublime-syntax
- include: Packages/Naomi/syntaxes/fjsx15/statement.sublime-syntax
- include: Packages/Naomi/syntaxes/fjsx15/literal/object.sublime-syntax
- include: Packages/Naomi/syntaxes/fjsx15/arrow-function.sublime-syntax
- include: Packages/Naomi/syntaxes/fjsx15/function.sublime-syntax
Expand Down
24 changes: 10 additions & 14 deletions syntaxes/js15/operator/other.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,24 @@ contexts:
pop: true
- match: \?
scope: operator.js.js15
set: [
ternary-value-b,
ternary-value-a
]
set: ternary-condition
- match: \.
scope: operator.member.access.js.js15
set: member-access

ternary-value-a:
- match: ":"
scope: operator.js.js15
ternary-condition:
- match: \s*(:)
captures:
1: operator.js.js15
pop: true
- include: expression

ternary-value-b:
- include: expression
- match: (?=\S)
push:
- match: (?=:)
pop: true
- include: Packages/Naomi/syntaxes/fjsx15/expression.sublime-syntax

member-access:
- meta_content_scope: member.js.js15
- include: Packages/Naomi/syntaxes/fjsx15/function-call.sublime-syntax
- include: Packages/Naomi/syntaxes/js15/constant.sublime-syntax
- include: Packages/Naomi/syntaxes/fjsx15/variable.sublime-syntax

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

0 comments on commit 2f29d0d

Please sign in to comment.