JSSpecCompiler+LibXML: Store location for tokens

This commit is contained in:
Dan Klishch 2024-01-16 20:47:08 -05:00 committed by Andrew Kaster
parent d219c91ca9
commit dee4978d67
Notes: sideshowbarker 2024-07-16 23:34:44 +09:00
7 changed files with 78 additions and 50 deletions

View file

@ -226,7 +226,7 @@ ParseErrorOr<Tree> TextParser::parse_expression()
if (token.type == TokenType::ParenOpen) {
if (last_element_type == ExpressionType)
stack.append(Token { TokenType::FunctionCall, ""sv, m_node });
stack.append(Token { TokenType::FunctionCall, ""sv, token.node, token.location });
stack.append(token);
if (m_next_token_index + 1 < m_tokens.size()