cariboujs 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +6 -2
  2. package/c/CLexer.js +332 -333
  3. package/c/CParser.js +4 -4
  4. package/c/CParserBase.js +27 -1
  5. package/c/SymbolTable.js +6 -1
  6. package/cpp/CPP14Parser.js +415 -404
  7. package/csharp/v8-spec/CSharpParser.js +3943 -3932
  8. package/csharp/v8-spec/CSharpParserBase.js +19 -1
  9. package/cypher/CypherParser.js +1171 -780
  10. package/cypher/CypherParserListener.js +27 -0
  11. package/cypher/CypherParserVisitor.js +18 -0
  12. package/gql/GQLLexer.js +2203 -0
  13. package/gql/GQLListener.js +5499 -0
  14. package/gql/GQLParser.js +58653 -0
  15. package/gql/GQLVisitor.js +3670 -0
  16. package/maml/MAMLLexer.js +116 -0
  17. package/maml/MAMLListener.js +72 -0
  18. package/maml/MAMLParser.js +935 -0
  19. package/maml/MAMLVisitor.js +52 -0
  20. package/odin/odinLexer.js +739 -0
  21. package/odin/odinListener.js +882 -0
  22. package/odin/odinParser.js +12189 -0
  23. package/odin/odinVisitor.js +592 -0
  24. package/package.json +1 -1
  25. package/sql/mysql/Oracle/MySQLLexer.js +3689 -3668
  26. package/sql/mysql/Oracle/MySQLParser.js +4383 -4399
  27. package/sql/plsql/PlSqlLexer.js +13604 -13587
  28. package/sql/plsql/PlSqlParser.js +43390 -40158
  29. package/sql/plsql/PlSqlParserListener.js +36 -0
  30. package/sql/plsql/PlSqlParserVisitor.js +24 -0
  31. package/sql/postgresql/PostgreSQLParser.js +91 -91
  32. package/sql/snowflake/SnowflakeParser.js +1556 -1536
  33. package/sql/sqlite/SQLiteParser.js +2074 -1737
  34. package/turtle/TURTLELexer.js +155 -156
  35. package/vba/vba7_1/vbaLexer.js +1689 -0
  36. package/vba/vba7_1/vbaParser.js +42797 -0
  37. package/vba/vba7_1/vbaParserListener.js +3267 -0
  38. package/vba/vba7_1/vbaParserVisitor.js +2182 -0
  39. package/vhdl/vhdl2008/vhdl2008Listener.js +9 -0
  40. package/vhdl/vhdl2008/vhdl2008Parser.js +2840 -2705
  41. package/vhdl/vhdl2008/vhdl2008Visitor.js +6 -0
  42. package/wkt/wktLexer.js +177 -148
  43. package/wkt/wktListener.js +123 -60
  44. package/wkt/wktParser.js +1802 -1125
  45. package/wkt/wktVisitor.js +72 -30
  46. /package/scala/{ScalaLexer.js → scala2/ScalaLexer.js} +0 -0
  47. /package/scala/{ScalaListener.js → scala2/ScalaListener.js} +0 -0
  48. /package/scala/{ScalaParser.js → scala2/ScalaParser.js} +0 -0
  49. /package/scala/{ScalaVisitor.js → scala2/ScalaVisitor.js} +0 -0
@@ -322,7 +322,25 @@ export default class CSharpParserBase extends antlr4.Parser {
322
322
  return tok2 !== null && (tok2.type === CSharpLexer.Simple_Identifier || tok2.text === '_');
323
323
  }
324
324
 
325
- IsConstantPatternAhead() { return !this.IsDeclarationPatternAhead(); }
325
+ IsConstantPatternAhead() {
326
+ if (this.IsDeclarationPatternAhead()) return false;
327
+ if (this._input.LT(1)?.type === CSharpLexer.TK_LPAREN) {
328
+ let depth = 0, i = 1;
329
+ while (true) {
330
+ const tok = this._input.LT(i++);
331
+ if (!tok || tok.type < 0) break;
332
+ if (tok.type === CSharpLexer.TK_LPAREN) depth++;
333
+ else if (tok.type === CSharpLexer.TK_RPAREN) { depth--; if (depth === 0) break; }
334
+ else if (tok.type === CSharpLexer.TK_COMMA && depth === 1) return false;
335
+ }
336
+ }
337
+ // Identifier followed immediately by '(' → type-headed positional pattern.
338
+ if (this._input.LT(1)?.type === CSharpLexer.Simple_Identifier
339
+ && this._input.LT(2)?.type === CSharpLexer.TK_LPAREN) return false;
340
+ return true;
341
+ }
342
+
343
+ IsPositionalPatternAhead() { return !this.IsConstantPatternAhead(); }
326
344
 
327
345
  IsImplicitlyTypedLocalVariable() {
328
346
  const tok = this._input.LT(1);