summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCpp/Lexer.cpp
AgeCommit message (Collapse)Author
2021-08-21LibCpp: Add lex_iterable() method to the LexerItamar
This allows us to collect the tokens iteratively instead of having to lex the whole program and then get a tokens vector.
2021-08-21LibCpp: Allow whitespace between # and preprocessor directiveItamar
For example, '# include <stdio.h>' is now supported by the Lexer.
2021-08-14LibCpp: Add lexer option to ignore whitespace tokensItamar
2021-08-07LibCpp: Support initializing the lexer with a "start line"Itamar
2021-08-02LibCpp: Correctly parse lines that end in '\'Ali Mohammad Pur
Such lines should be considered to be joined into the next line. This makes multiline preprocessor stuff "work".
2021-06-16LibCpp: Remove InlineLinkedList from the list of known typesBrian Gianforcaro
2021-06-09LibCpp: Make 'bool' a Token::Type::KnownTypeItamar
2021-06-05LibCpp: Do not emit empty whitespace token after include statementMax Wipfli
If an include statement didn't contain whitespace between the word "include" and the '<' or '"', the lexer would previous emit an empty whitespace token. This has been changed now.
2021-06-05LibCpp: Use CharacterTypes.h and constexpr functions in LexerMax Wipfli
2021-06-05LibCpp: Use east const style in Lexer and SyntaxHighlighterMax Wipfli
2021-05-09LibCpp: Support Lexing escaped newlinesItamar
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-13LibCpp: Store the text of a token as a StringView memberItamar
2021-03-13LibCpp: Access Cpp::Token members via getter functionsItamar
2021-03-13LibCpp: Move Cpp::Token to a separate fileItamar
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-13LibCpp: Fix lexing & parsing of non-terminated stringsItamar
2021-01-27LibCpp: Add the beginning of a C++ parserItamar
This parser will be used by the C++ langauge server to provide better auto-complete (& maybe also other things in the future). It is designed to be error tolerant, and keeps track of the position spans of the AST nodes, which should be useful later for incremental parsing.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling