Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar extensions #10

Merged
merged 3 commits into from
Mar 5, 2015
Merged

Commits on Mar 5, 2015

  1. Apply commit 80e8c12 to source file

    Commit 80e8c12 (Restrict Object prototype functions) was applied to the
    generated file rather than the source file.
    msantos committed Mar 5, 2015
    Configuration menu
    Copy the full SHA
    9ab71d2 View commit details
    Browse the repository at this point in the history
  2. Support quoted symbols

    A JSON key (referred to as a symbol by the filtrex grammar) is a string
    that may contain operators. For example, a JSON key containing a dash is
    valid but will be parsed as an arithmetic operation:
    
        {"country-code": "US"}
        compileExpression.parser.parse("country-code == \"US\"")
    
    Results in:
    
        country - code == "US"
    
    Indicate a literal symbol by using a single quote:
    
        compileExpression.parser.parse("'country-code' == \"US\"")
    
    Similar to double quotes in strings, single quotes in symbols are
    not valid: 'invalid\'symbol'
    msantos committed Mar 5, 2015
    Configuration menu
    Copy the full SHA
    fa299f8 View commit details
    Browse the repository at this point in the history
  3. Support regular expression matches

    Introduce an operator (~=) to perform matches using regular expressions:
    
        {country: "US"}
        country ~= "^(US|CA)"
    msantos committed Mar 5, 2015
    Configuration menu
    Copy the full SHA
    e446ae9 View commit details
    Browse the repository at this point in the history