cariboujs 2.0.5 → 2.0.7

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 (54) hide show
  1. package/README.md +7 -2
  2. package/abnf/AbnfLexer.js +51 -50
  3. package/c/CLexer.js +332 -333
  4. package/c/CParser.js +4 -4
  5. package/c/CParserBase.js +27 -1
  6. package/c/SymbolTable.js +6 -1
  7. package/cpp/CPP14Parser.js +415 -404
  8. package/csharp/v8-spec/CSharpParser.js +3943 -3932
  9. package/csharp/v8-spec/CSharpParserBase.js +19 -1
  10. package/cypher/CypherParser.js +1171 -780
  11. package/cypher/CypherParserListener.js +27 -0
  12. package/cypher/CypherParserVisitor.js +18 -0
  13. package/gql/GQLLexer.js +2203 -0
  14. package/gql/GQLListener.js +5499 -0
  15. package/gql/GQLParser.js +58653 -0
  16. package/gql/GQLVisitor.js +3670 -0
  17. package/maml/MAMLLexer.js +116 -0
  18. package/maml/MAMLListener.js +72 -0
  19. package/maml/MAMLParser.js +935 -0
  20. package/maml/MAMLVisitor.js +52 -0
  21. package/miniscript/MiniscriptLexer.js +199 -0
  22. package/miniscript/MiniscriptListener.js +180 -0
  23. package/miniscript/MiniscriptParser.js +2620 -0
  24. package/miniscript/MiniscriptVisitor.js +124 -0
  25. package/odin/odinLexer.js +739 -0
  26. package/odin/odinListener.js +882 -0
  27. package/odin/odinParser.js +12189 -0
  28. package/odin/odinVisitor.js +592 -0
  29. package/package.json +1 -1
  30. package/sql/mysql/Oracle/MySQLLexer.js +3689 -3668
  31. package/sql/mysql/Oracle/MySQLParser.js +4383 -4399
  32. package/sql/plsql/PlSqlLexer.js +13604 -13587
  33. package/sql/plsql/PlSqlParser.js +43442 -40169
  34. package/sql/plsql/PlSqlParserListener.js +36 -0
  35. package/sql/plsql/PlSqlParserVisitor.js +24 -0
  36. package/sql/postgresql/PostgreSQLParser.js +91 -91
  37. package/sql/snowflake/SnowflakeParser.js +1556 -1536
  38. package/sql/sqlite/SQLiteParser.js +2074 -1737
  39. package/turtle/TURTLELexer.js +155 -156
  40. package/vba/vba7_1/vbaLexer.js +1689 -0
  41. package/vba/vba7_1/vbaParser.js +42797 -0
  42. package/vba/vba7_1/vbaParserListener.js +3267 -0
  43. package/vba/vba7_1/vbaParserVisitor.js +2182 -0
  44. package/vhdl/vhdl2008/vhdl2008Listener.js +9 -0
  45. package/vhdl/vhdl2008/vhdl2008Parser.js +2840 -2705
  46. package/vhdl/vhdl2008/vhdl2008Visitor.js +6 -0
  47. package/wkt/wktLexer.js +177 -148
  48. package/wkt/wktListener.js +123 -60
  49. package/wkt/wktParser.js +1802 -1125
  50. package/wkt/wktVisitor.js +72 -30
  51. /package/scala/{ScalaLexer.js → scala2/ScalaLexer.js} +0 -0
  52. /package/scala/{ScalaListener.js → scala2/ScalaListener.js} +0 -0
  53. /package/scala/{ScalaParser.js → scala2/ScalaParser.js} +0 -0
  54. /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);