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(); }
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(); }
public OperatorParser() : base("^ /(|tabs|) /('nofix' | 'prefix' | 'suffix' | 'infix') /(/s+) /(['a-z'] ['a-z0-9']* '?'?) /(/s* '(')") { functionBodyParser = new FunctionBodyParser(); }