예제 #1
0
		public void Comment()
		{
			/*@bgen(jjtree) Comment */
			ASTComment jjtn000 = new ASTComment(this, ParserTreeConstants.COMMENT);
			nodeTree.OpenNodeScope(jjtn000);
			try
			{
				switch(GetCurrentTokenKind())
				{
					case ParserConstants.SINGLE_LINE_COMMENT:
						ConsumeToken(ParserConstants.SINGLE_LINE_COMMENT);
						break;

					case ParserConstants.MULTI_LINE_COMMENT:
						ConsumeToken(ParserConstants.MULTI_LINE_COMMENT);
						break;

					case ParserConstants.FORMAL_COMMENT:
						ConsumeToken(ParserConstants.FORMAL_COMMENT);
						break;

					default:
						jj_la1[3] = jj_gen;
						ConsumeToken(-1);
						throw new ParseException();
				}
			}
			finally
			{
				nodeTree.CloseNodeScope(jjtn000, true);
			}
		}
예제 #2
0
		public virtual Object Visit(ASTComment node, Object data)
		{
			data = node.ChildrenAccept(this, data);
			return data;
		}