-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Edoardo Pirovano
committed
Jul 8, 2016
1 parent
8f4cc73
commit 9b7611d
Showing
2 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
%YAML 1.2 | ||
--- | ||
name: QL | ||
file_extensions: [ql,qll] | ||
scope: source.QL | ||
contexts: | ||
main: | ||
- match: \b(import)[ ] | ||
scope: keyword.other | ||
push: qualid | ||
- match: \b(boolean|date|float|int|string)\b | ||
scope: storage.type | ||
- match: \b(@[a-z][a-zA-Z0-9_]*)\b | ||
scope: support.type | ||
- match: \b(or|and|not|implies|if|then|else|=|!=|<|>|<=|>=|instanceof|+|-|*|/|%)\b | ||
scope: keyword.operator | ||
- match: \b(false|true)\b | ||
scope: constant.language | ||
- match: \b(this|result)\b | ||
scope: variable.language | ||
- match: '"' | ||
push: string | ||
- match: '//' | ||
scope: punctuation.definition.comment | ||
push: line_comment | ||
- match: '/\*' | ||
scope: punctuation.definition.comment | ||
push: block_comment | ||
- match: '(abstract|cache|external|final|library|noopt|private|deprecated)' | ||
scope: storage.modifier | ||
|
||
qualid: | ||
- meta_scope: meta.qualid | ||
- match: '[a-zA-Z0-9_.]' | ||
- match: (.|\n) | ||
pop: true | ||
|
||
string: | ||
- meta_scope: string.quoted.double | ||
- match: '\\(\\|"|n|r|t)' | ||
scope: constant.character.escape | ||
- match: '(\\|\n|\t|\r)' | ||
scope: invalid.illegal | ||
- match: '"' | ||
pop: true | ||
|
||
line_comment: | ||
- meta_scope: comment.line | ||
- match: $ | ||
pop: true | ||
|
||
block_comment: | ||
- meta_scope: comment.block | ||
- match: '\*/' | ||
scope: punctuation.definition.comment | ||
pop: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# SublimeText3-QL | ||
Syntax plugin for QL in Sublime Text 3 | ||
# QLSyntax | ||
Syntax plugin for Semmle's QL in Sublime Text 3. Note this is a third party plugin not supported by Semmle. Note also it is in early development and not yet complete. |