Closed aMOPel closed 2 years ago
conceptParam = ('var' | 'out')? symbol conceptDecl = 'concept' conceptParam ^* ',' (pragma)? ('of' typeDesc ^* ',')? &IND{>} stmt primary = operatorB primary primarySuffix* | tupleDecl | routineExpr | enumDecl objectDecl | conceptDecl | ('bind' primary) ('var' | 'out' | 'ref' | 'ptr' | 'distinct') primary / prefixOperator* identOrLiteral primarySuffix*
see existing tests below https://nim-lang.org/docs/manual_experimental.html#concepts
https://github.com/aMOPel/tree-sitter-nim/blob/main/grammar.js#L287
(needs to be moved to test/corpus/declarations.txt) https://github.com/aMOPel/tree-sitter-nim/blob/main/test/declaration.txt#L325
test/corpus/declarations.txt
severely impacted parser generation and compile time
official grammar:
example:
see existing tests below https://nim-lang.org/docs/manual_experimental.html#concepts
some work has already been done:
https://github.com/aMOPel/tree-sitter-nim/blob/main/grammar.js#L287
existing tests:
(needs to be moved to
test/corpus/declarations.txt
) https://github.com/aMOPel/tree-sitter-nim/blob/main/test/declaration.txt#L325encountered problem
severely impacted parser generation and compile time