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

UPW[WIP]: faster, lightweight, more flexible and concisely implemented pattern matching #83

Merged
merged 17 commits into from
May 4, 2020

Commits on May 1, 2020

  1. Configuration menu
    Copy the full SHA
    56ce973 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2020

  1. core

    thautwarm committed May 2, 2020
    Configuration menu
    Copy the full SHA
    43834c0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d9bf45c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e9ae5a6 View commit details
    Browse the repository at this point in the history
  4. lift and integrate errors

    thautwarm committed May 2, 2020
    Configuration menu
    Copy the full SHA
    75bb1a6 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2020

  1. Configuration menu
    Copy the full SHA
    fbaa6a9 View commit details
    Browse the repository at this point in the history
  2. datatype, view patterns

    thautwarm committed May 3, 2020
    Configuration menu
    Copy the full SHA
    a79812f View commit details
    Browse the repository at this point in the history
  3. consistent code gen api(the last 2 params are module and linenumberno…

    …de) & Sugars module(Q, And, Or) & LambdaCases & pattern_compile->pattern_uncall & add pattern_unref
    thautwarm committed May 3, 2020
    Configuration menu
    Copy the full SHA
    2cc9ea5 View commit details
    Browse the repository at this point in the history
  4. uncomprehensions

    thautwarm committed May 3, 2020
    Configuration menu
    Copy the full SHA
    ce21e24 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ab30ad0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0a5e3fe View commit details
    Browse the repository at this point in the history
  7. WIP: tests

    thautwarm committed May 3, 2020
    Configuration menu
    Copy the full SHA
    1158d7a View commit details
    Browse the repository at this point in the history

Commits on May 4, 2020

  1. compatibility & test passing:

    * support 'MLStyle.Modules.*'
    * all tests passing
      - add '@testcase' macro and '@lift' marker in "runtests.jl". works perfectly for our cases.
    * restore MLStyle.Render but deprecate it
    * no need of 'MLStyle.Modules.AST.Compat' as now our pattern totally can somehow understand the scope info.
    * fix duplicate @Label issues in when patterns('@when' from 'MLStyle.StandardPatterns.WhenCases'):
        - add 'CFGItem' and 'CFGSpec' types to MLStyle.AbstractPattern.
        - use CFGJump(CFGJump(:x) = CFGItem(:symbolicgoto, :x)) and CFGLabel(works the same way as CFGJump)
        - 'MLStyle.AbstractPattern.init_cfg':
          every time, when using generator functions from MLStyle APIs, such as 'gen_match', 'gen_switch',
          you should invoke 'MLStyle.AbstractPattern.init_cfg' before splicing it into your code.
    * record matching:
       support 4 kinds of matching for records:
       1. positional:  S(a, b, c)
       2. field punning: S(; a, b=b_, c=c_), 'a, b, c' are names,  'b_, c_' are patterns
       3. wildcard constructor: S(_), if type of S matches. for compatibility, and consistency with active patterns
       4. just type check(same as 3): S()
    * active pattern clarification:
       - S()  : if '@Active S(x)' returns true, otherwise(fail) returns false
       - S(v) : if '@Active S(x)' returns Some(v), otherwise(fail) returns nothing
       - S(a, b): more than 2 arguments, '@Active S(x)' returns a tuple
    * fix some typos in documentations(cuture->cultural, etc)
    thautwarm committed May 4, 2020
    Configuration menu
    Copy the full SHA
    4cefcc8 View commit details
    Browse the repository at this point in the history
  2. fix tests for 1.0 and 1.1

    thautwarm committed May 4, 2020
    Configuration menu
    Copy the full SHA
    061b199 View commit details
    Browse the repository at this point in the history
  3. documentations

    thautwarm committed May 4, 2020
    Configuration menu
    Copy the full SHA
    d28643f View commit details
    Browse the repository at this point in the history
  4. documentations for switch

    thautwarm committed May 4, 2020
    Configuration menu
    Copy the full SHA
    a5651ac View commit details
    Browse the repository at this point in the history
  5. docs for 0.4 hints

    thautwarm committed May 4, 2020
    Configuration menu
    Copy the full SHA
    808804b View commit details
    Browse the repository at this point in the history