public IState GetNext(char c) { if (IdentifierState.IsIdentifierChar(c)) { return(null); } if (char.IsWhiteSpace(c)) { return(new WhitespaceState()); } if (c == '{') { return(new OpenBraceState()); } if (c == ':') { return(new ColonState()); } if (c == ';') { return(new SemiColonState()); } throw new TokenizerException(c, "Identifier"); }
public IState GetNext(char c) { if (char.IsWhiteSpace(c)) { return(new WhitespaceState()); } if (IdentifierState.IsIdentifierChar(c)) { return(new IdentifierState()); } throw new TokenizerException(c, "CloseBrace"); }