@Test public void scss_import() { List<CssToken> tokenList = tokenizer.tokenize("@import 'base';"); assertThat(tokenList.size()).isEqualTo(3); assertToken(tokenList, 0, "@import", CssTokenType.AT_IDENTIFIER); assertToken(tokenList, 1, "'base'", CssTokenType.STRING); assertToken(tokenList, 2, ";", CssTokenType.PUNCTUATOR); }
public List<CssToken> tokenize(String css) { List<Token> tokenList = CssLexer.create().lex(css); List<Token> cloneTokenList = new ArrayList<>(tokenList); cloneTokenList.remove(cloneTokenList.size() - 1); return cloneTokenList.stream().map(CssToken::new).collect(Collectors.toList()); }
Tokenizer { public List<CssToken> tokenize(String css) { List<Token> tokenList = CssLexer.create().lex(css); List<Token> cloneTokenList = new ArrayList<>(tokenList); cloneTokenList.remove(cloneTokenList.size() - 1); return cloneTokenList.stream().map(CssToken::new).collect(Collectors.toList()); } }
Tokenizer { public List<CssToken> tokenize(String css) { List<Token> tokenList = CssLexer.create().lex(css); List<Token> cloneTokenList = new ArrayList<>(tokenList); cloneTokenList.remove(cloneTokenList.size() - 1); return cloneTokenList.stream().map(CssToken::new).collect(Collectors.toList()); }  }
Tokenizer { public List<CssToken> tokenize(String css) { List<Token> tokenList = CssLexer.create().lex(css); List<Token> cloneTokenList = new ArrayList<>(tokenList); cloneTokenList.remove(cloneTokenList.size() - 1); return cloneTokenList.stream().map(CssToken::new).collect(Collectors.toList()); }  List<CssToken> tokenize(String css); }
Tokenizer { public List<CssToken> tokenize(String css) { List<Token> tokenList = CssLexer.create().lex(css); List<Token> cloneTokenList = new ArrayList<>(tokenList); cloneTokenList.remove(cloneTokenList.size() - 1); return cloneTokenList.stream().map(CssToken::new).collect(Collectors.toList()); }  List<CssToken> tokenize(String css);  }