Package org.jboss.ide.eclipse.freemarker.lang

Examples of org.jboss.ide.eclipse.freemarker.lang.ParserUtils.match()


public class AssignmentDirective extends AbstractDirective {

  public static Boolean isNestable(String cont, Directive type) throws ParseException {
    ParserUtils parser = new ParserUtils(cont);
    /* the directive name */
    parser.match(type.getKeyword().toString());
    parser.consumeWhiteSpace();
    /* first variable name */
    parser.consumeIdentifierOrStringLiteral();
    parser.consumeWhiteSpace();
    /* lack of an equals sign at this position means that this is a nesting form of assign */
 
View Full Code Here


    assertEquals(true, parser.isAtEndOfInput());
  }

  public void testMatch() throws ParseException {
    ParserUtils parser = new ParserUtils("assign"); //$NON-NLS-1$
    assertEquals(6, parser.match("assign")); //$NON-NLS-1$
    assertEquals("assign", parser.getLastToken()); //$NON-NLS-1$

    parser = new ParserUtils("\\x "); //$NON-NLS-1$
    try {
      parser.consumeEscapedChar();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.