Ejemplo n.º 1
0
        public static string[] GetVerbatimNames(this AstNode node, GeneroAst ast)
        {
            object names;

            if (ast.TryGetAttribute(node, NodeAttributes.VerbatimNames, out names))
            {
                return((string[])names);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 2
0
        public static string GetVerbatimImage(this AstNode node, GeneroAst ast)
        {
            object image;

            if (ast.TryGetAttribute(node, NodeAttributes.VerbatimImage, out image))
            {
                return((string)image);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 3
0
        public static string[] GetNamesWhiteSpace(this AstNode node, GeneroAst ast)
        {
            object whitespace;

            if (ast.TryGetAttribute(node, NodeAttributes.NamesWhiteSpace, out whitespace))
            {
                return((string[])whitespace);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 4
0
        public static bool IsIncompleteNode(this AstNode node, GeneroAst ast)
        {
            object dummy;

            if (ast.TryGetAttribute(node, NodeAttributes.ErrorIncompleteNode, out dummy))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 5
0
        public static bool IsMissingCloseGrouping(this AstNode node, GeneroAst ast)
        {
            object dummy;

            if (ast.TryGetAttribute(node, NodeAttributes.ErrorMissingCloseGrouping, out dummy))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 6
0
        public static bool IsAltForm(this AstNode node, GeneroAst ast)
        {
            object dummy;

            if (ast.TryGetAttribute(node, NodeAttributes.IsAltFormValue, out dummy))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 7
0
        private static string GetWhiteSpace(AstNode node, GeneroAst ast, object kind, string defaultValue = " ")
        {
            object whitespace;

            if (ast.TryGetAttribute(node, kind, out whitespace))
            {
                return((string)whitespace);
            }
            else
            {
                return(defaultValue);
            }
        }