diff options
| author | Jirgn <jirgn76@googlemail.com> | 2021-11-26 16:37:51 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2021-11-26 22:04:59 +0100 |
| commit | 979c32493d1edabb949badf00da9d130d966aaae (patch) | |
| tree | 1ecc73f323a2a72910d24714cab880acd8886d8f /tests/query/highlights/fusion/expressions.fusion | |
| parent | highlights(rust): organize keywords and literals (diff) | |
| download | nvim-treesitter-979c32493d1edabb949badf00da9d130d966aaae.tar nvim-treesitter-979c32493d1edabb949badf00da9d130d966aaae.tar.gz nvim-treesitter-979c32493d1edabb949badf00da9d130d966aaae.tar.bz2 nvim-treesitter-979c32493d1edabb949badf00da9d130d966aaae.tar.lz nvim-treesitter-979c32493d1edabb949badf00da9d130d966aaae.tar.xz nvim-treesitter-979c32493d1edabb949badf00da9d130d966aaae.tar.zst nvim-treesitter-979c32493d1edabb949badf00da9d130d966aaae.zip | |
feat: add fusion grammar and highlights
Diffstat (limited to 'tests/query/highlights/fusion/expressions.fusion')
| -rw-r--r-- | tests/query/highlights/fusion/expressions.fusion | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/tests/query/highlights/fusion/expressions.fusion b/tests/query/highlights/fusion/expressions.fusion new file mode 100644 index 000000000..db71a628a --- /dev/null +++ b/tests/query/highlights/fusion/expressions.fusion @@ -0,0 +1,74 @@ +string = ${'foo'} +// ^string + +string = ${'foo \'bar\' baz'} +// ^string + +string = ${"foo"} +// ^string + +string = ${"foo ${test}"} +// ^string + +boolean = ${true} +// ^boolean + +number = ${1} +// ^number + +number = ${1.2} +// ^number + +propertyPath = ${property.path} +// ^variable +// ^variable + +array = ${[]} +// ^punctation.bracket + +array = ${[true, 'string', 1, [true]]} +// ^punctation.bracket +// ^boolean +// ^string +// ^number +// ^punctation.bracket +// ^boolean + +object = ${{}} +// ^punctation.bracket + +object = ${{first: 'value', second: true, third: [], fourth: object.path }} +// ^property +// ^string +// ^property +// ^boolean +// ^property +// ^punctation.bracket +// ^property +// ^variable + +result = ${methodCall()} +// ^function + +result = ${Some.methodCall(param, param)} +// ^function +// ^variable +// ^variable + +arrowFunction = ${map(foo, (bar, buz) => bar * buz)} +// ^function +// ^variable +// ^variable + +logic = ${!foo && !(bar || baz) and not 'string'} +// ^operator +// ^operator +// ^operator +// ^operator +// ^operator + +ternary = ${ check ? true : false} +// ^punctation.delimiter +// ^punctation.delimiter + + |
