Пример #1
0
 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;
 }
Пример #2
0
        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);
        }