Skip to content

Commit

Permalink
Copy comment definition from shell syntax definition. Fixes #9
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnNilsson committed Sep 27, 2016
1 parent 792d921 commit 1ce5f90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions AWK.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ contexts:
- include: pattern

comment:
- match: "#.*"
scope: punctuation.definition.comment.awk
- match: '(?<!\S)(#)(?!\{).*$\n?'
scope: comment.line.number-sign.awk
captures:
1: punctuation.definition.comment.awk

procedure:
- match: '{'
Expand Down
3 changes: 2 additions & 1 deletion syntax_test.awk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SYNTAX TEST "AWK.sublime-syntax"
# <- punctuation.definition.comment.awk
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ punctuation.definition.comment.awk
# <- comment.line.number-sign.awk
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.number-sign.awk
function f(x,y){
# <- storage.type.function.awk
# ^ entity.name.function.awk
Expand Down

0 comments on commit 1ce5f90

Please sign in to comment.