Beispiel #1
0
        public object Visit(TextPrime obj)
        {
            string codeString = "";

            //<TextPrime> ::= '+' StringValue <TextPrime>
            if (obj.NodeType == TextPrime.NodeTypes.StringValueTextPrime)
            {
                codeString += obj.StringValue;
            }

            //<TextPrime> ::= '+' <Identifiers> <TextPrime>
            else if (obj.NodeType == TextPrime.NodeTypes.IdentifiersTextPrime)
            {
                codeString += obj.Value.Accept(this);
            }

            // Used in both Rules
            if (obj.Prime != null)
            {
                codeString += " + ";
                codeString += (string)obj.Prime.Accept(this);
            }


            return(codeString);
        }
Beispiel #2
0
 public object Visit(TextPrime obj)
 {
     if (obj.NodeType == TextPrime.NodeTypes.IdentifiersTextPrime)
     {
         obj.Value.Accept(this);
     }
     obj.Prime?.Accept(this);
     return(null);
 }
Beispiel #3
0
 public object Visit(TextPrime obj)
 {
     throw new NotImplementedException();
 }