How to use the chevrotain.EMPTY_ALT function in chevrotain

To help you get started, we’ve selected a few chevrotain examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / chevrotain / examples / parser / content_assist / content_assist_complex.js View on Github external
$.RULE("visibility", () => {
      $.OR([
        { ALT: () => $.CONSUME(Private) },
        { ALT: () => $.CONSUME(Public) },
        { ALT: EMPTY_ALT("EMPTY_ALT") }
      ])
    })
github SAP / chevrotain / examples / grammars / csv / csv.js View on Github external
$.RULE("field", () => {
      $.OR([
        { ALT: () => $.CONSUME(Text) },
        { ALT: () => $.CONSUME(String) },
        { ALT: EMPTY_ALT("empty field") }
      ])
    })