Skip to content

Commit

Permalink
Initial support for Angular expression syntax
Browse files Browse the repository at this point in the history
This commit...

1. adds syntax definitions for Angular expression syntax,
   which is a subset of JavaScript.
   see: https://angular.dev/guide/templates/expression-syntax

   Required rules are directly implemented in favor of re-using/including
   JavaScript to reduce dependencies and keep syntax lean (from parser's
   point of view).

2. adds syntax based folding rules to be able to fold control flow blocks
   regardless used indentation style.

3. adds symbol list definition to index `@let` variables.
  • Loading branch information
deathaxe committed Dec 14, 2024
1 parent 3184b01 commit 81d5b8d
Show file tree
Hide file tree
Showing 5 changed files with 1,174 additions and 193 deletions.
51 changes: 51 additions & 0 deletions Fold.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>text.html.ngx</string>
<key>settings</key>
<dict>
<key>foldScopes</key>
<array>
<dict>
<key>begin</key>
<string>punctuation.definition.comment.begin</string>
<key>end</key>
<string>punctuation.definition.comment.end</string>
<key>excludeTrailingNewlines</key>
<false/>
</dict>
<dict>
<key>begin</key>
<string>punctuation.section.block.begin</string>
<key>end</key>
<string>punctuation.section.block.end</string>
</dict>
<dict>
<key>begin</key>
<string>punctuation.section.embedded.begin</string>
<key>end</key>
<string>punctuation.section.embedded.end</string>
</dict>
<dict>
<key>begin</key>
<string>punctuation.section.group.begin</string>
<key>end</key>
<string>punctuation.section.group.end</string>
</dict>
<dict>
<key>begin</key>
<string>punctuation.section.mapping.begin</string>
<key>end</key>
<string>punctuation.section.mapping.end</string>
</dict>
<dict>
<key>begin</key>
<string>punctuation.section.sequence.begin</string>
<key>end</key>
<string>punctuation.section.sequence.end</string>
</dict>
</array>
</dict>
</dict>
</plist>
Loading

0 comments on commit 81d5b8d

Please sign in to comment.