Example #1
0
 internal FunctionDefinition(FunctionPrototype prototype, Expression body)
 {
     this.Prototype = prototype;
     this.Body      = body;
 }
Example #2
0
        public void VisitFunctionPrototype(FunctionPrototype prototype)
        {
            var joinedParameterNames = string.Join(", ", prototype.ParameterNames.Select(p => "\"" + p + "\""));

            this._writer.WriteLine($@"{ this.Padding }Prototype {{ name: ""{ prototype.Name }"", parameter_names: [{ joinedParameterNames }] }}{ this.TrailingComma }");
        }
Example #3
0
 internal FunctionDeclaration(FunctionPrototype prototype)
 {
     this.Prototype = prototype;
 }