public string Visit(Rel_ node, int modo) { var str = ""; str = str + Visit((dynamic)node[0], 4) + "\n"; str = str + Visit((dynamic)node[1], 4) + "\n"; if (node.AnchorToken.lexeme == ">") { str = str + "\t\tcgt\n"; } else if (node.AnchorToken.lexeme == "<") { str = str + "\t\tclt\n"; } else if (node.AnchorToken.lexeme == ">=") { str = str + "\t\tclt\n"; str = str + "\t\tldc.i8 1\n"; str = str + "\t\txor\n"; } else if (node.AnchorToken.lexeme == "<=") { str = str + "\t\tcgt\n"; str = str + "\t\tldc.i8 1\n"; str = str + "\t\txor\n"; } return(str); }
public Node expr_rel() { //Console.WriteLine("expr_rel"); //Console.WriteLine("expr_rel"); Node expr_bit_or_ = expr_bit_or(); if (CurrentToken == TokenCategory.LESSEQUAL || CurrentToken == TokenCategory.MOREEQUAL || CurrentToken == TokenCategory.MORE || CurrentToken == TokenCategory.LESS) { //Console.WriteLine("while5"); var rel = new Rel_(); var r = op_rel(); rel.AnchorToken = r; rel.Add(expr_bit_or_); rel.Add(expr_bit_or()); return(rel); } return(expr_bit_or_); }
public void Visit(Rel_ node, int modo) { VisitChildren(node, modo); }