Skip to content

Commit

Permalink
Fix issue with .gitignore, make operator token required for arguments…
Browse files Browse the repository at this point in the history
… in strict mode.
  • Loading branch information
rbuckton committed Jun 8, 2016
1 parent 7682856 commit fdd1143
Show file tree
Hide file tree
Showing 20 changed files with 25,331 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
node_modules
lib
tests/*.js
tests/*.map
tests/baselines/local
!src/lib
tests
!tests/baselines
!src/tests
spec/*.grammar.html
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grammarkdown",
"version": "1.0.2",
"version": "1.0.3",
"description": "Markdown-like DSL for defining syntactic grammars for programming languages.",
"license": "Apache-2.0",
"keywords": [
Expand Down
4 changes: 4 additions & 0 deletions src/lib/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,10 @@ export class Checker {
return this.reportGrammarErrorForNode(node.operatorToken, Diagnostics.Unexpected_token_0_, tokenToString(node.operatorToken.kind));
}

if (!node.operatorToken && !this.noStrictParametricProductions) {
return this.reportGrammarError(node.pos, Diagnostics._0_expected, formatList([SyntaxKind.QuestionToken, SyntaxKind.PlusToken, SyntaxKind.TildeToken]));
}

return false;
}

Expand Down
1,994 changes: 1,994 additions & 0 deletions tests/baselines/reference/es6.grammar.emu.html

Large diffs are not rendered by default.

974 changes: 974 additions & 0 deletions tests/baselines/reference/es6.grammar.md

Large diffs are not rendered by default.

7,939 changes: 7,939 additions & 0 deletions tests/baselines/reference/es6.grammar.nodes

Large diffs are not rendered by default.

5,593 changes: 5,593 additions & 0 deletions tests/baselines/reference/es6.grammar.tokens

Large diffs are not rendered by default.

0 comments on commit fdd1143

Please sign in to comment.