diff options
Diffstat (limited to 'Meta/Lagom')
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp | 5 | ||||
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp index 6c4b86c941..b77794afcd 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp @@ -230,6 +230,7 @@ static NonnullOwnPtr<Interface> parse_interface(StringView filename, StringView if (lexer.consume_specific("//")) { lexer.consume_until('\n'); + lexer.ignore(); consumed = true; } } @@ -276,7 +277,9 @@ static NonnullOwnPtr<Interface> parse_interface(StringView filename, StringView while (lexer.consume_specific("#import")) { consume_whitespace(); assert_specific('<'); - imports.append(resolve_import(lexer.consume_until('>'))); + auto path = lexer.consume_until('>'); + lexer.ignore(); + imports.append(resolve_import(path)); consume_whitespace(); } diff --git a/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp b/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp index 4e3a903990..2c506fbb36 100644 --- a/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp @@ -88,10 +88,12 @@ parse_state_machine(StringView input) num = 16 * num + get_hex_value(c); } else { lexer.consume_specific('\''); - if (lexer.next_is('\\')) + if (lexer.next_is('\\')) { num = (int)lexer.consume_escaped_character('\\'); - else + } else { num = lexer.consume_until('\'').to_int().value(); + lexer.ignore(); + } lexer.consume_specific('\''); } return num; |