public KirinFunction(KirinFunctionStart startNode, KirinFunctionEnd endNode) : base(startNode.Start, (endNode.Start + endNode.Length) - startNode.Start) { this.Name = startNode.Name; this.Today = startNode.IsMain; this.Arguments = startNode.args; this.Returns = startNode.Return; }
public static bool TryParse(string content, int start, int length, out KirinNode result) { result = null; if (!content.StartsWith(PreKeyword)) { return(false); } result = new KirinFunctionEnd(start, length) { Name = content.Substring(PreKeyword.Length) }; return(true); }