Skip to content

Commit

Permalink
Add !include statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
nk9 committed Feb 8, 2023
1 parent f900067 commit ce3e4fe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Syntax/Just.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ variables:

contexts:
main:
- include: includes
- include: settings
- include: aliases
- include: comments
Expand All @@ -77,6 +78,15 @@ contexts:
- include: line-end


###[ IMPORTS ]#################################################################

includes:
- match: '^(!include) (.*)$'
scope: meta.statement.import.just
captures:
1: keyword.control.import.just
2: meta.generic-name.just

###[ ALIASES ]#################################################################

aliases:
Expand Down
7 changes: 7 additions & 0 deletions Syntax/tests/syntax_test_just.include.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SYNTAX TEST "Packages/Just/Syntax/Just.sublime-syntax"

!include path/to/file
#^^^^^^^^^^^^^^^^^^^^ meta.statement.import.just
# <- keyword.control.import.just
#^^^^^^^ keyword.control.import.just
# ^^^^^^^^^^^^ meta.generic-name.just

0 comments on commit ce3e4fe

Please sign in to comment.