Esempio n. 1
0
 public FunctionParser()
     : base("^ /(|tabs|) /(('public' | 'hidden' | 'imported') /s+)? /('override' /s+)? /('memo' /s+)?" +
            "/(('x'? 'func' | 'get' | 'set' | 'init' | 'pure' | 'before' | 'after' | 'rec' | 'require' | 'ensure' " +
            $"| 'invariant' | 'cofunc') |sp+|) /({REGEX_VARIABLE}) /(['(:['])")
 {
     functionBodyParser = new FunctionBodyParser();
     whereParser        = new WhereParser();
 }
Esempio n. 2
0
 public CurriedFunctionParser(string functionName, Parameters firstParameters, Object.VisibilityType visibility, bool overriding)
     : base("^ /(|sp| '(')")
 {
     this.functionName    = functionName;
     this.firstParameters = firstParameters;
     this.visibility      = visibility;
     this.overriding      = overriding;
     parametersParser     = new ParametersParser();
     freeParser           = new FreeParser();
     functionBodyParser   = new FunctionBodyParser();
 }
Esempio n. 3
0
 public OperatorParser() : base("^ /(|tabs|) /('nofix' | 'prefix' | 'suffix' | 'infix') /(/s+) /(['a-z'] ['a-z0-9']* '?'?) /(/s* '(')")
 {
     functionBodyParser = new FunctionBodyParser();
 }