Exemple #1
0
        public static void SetNodeStartLocation(ProtoCore.AST.Node node, ProtoCore.DesignScriptParser.Token token)
        {
            if (null == node || (null == token))
            {
                return;
            }

            node.line    = token.line;
            node.col     = token.col;
            node.charPos = token.charPos;
        }
        public static void SetNodeLocation(ProtoCore.AST.Node node, ProtoCore.DesignScriptParser.Token token)
        {
            if (null == node || (null == token))
            {
                return;
            }

            node.line   = node.endLine = token.line;
            node.col    = token.col;
            node.endCol = token.col + ((null == token.val) ? 0 : token.val.Length);
        }
 public void SetNodeEndLocation(ProtoCore.DesignScriptParser.Token token)
 {
     endLine = token.line;
     endCol  = token.col;
 }
 public void SetNodeStartLocation(ProtoCore.DesignScriptParser.Token token)
 {
     line = token.line;
     col  = token.col;
 }