summaryrefslogtreecommitdiff
path: root/Userland/Utilities/cpp-parser.cpp
AgeCommit message (Collapse)Author
2022-12-12LibCore: Rename `Stream::read_all` to `read_until_eof`Tim Schumacher
This generally seems like a better name, especially if we somehow also need a better name for "read the entire buffer, but not the entire file" somewhere down the line.
2022-11-19Utilities: Port cpp utilities to Core::StreamSam Atkins
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2021-12-11cpp-parser: Port to LibMain :^)Kenneth Myhra
2021-08-22Utilities: Use File.error_string() instead of perror(3) in cpp-*Ralf Donau
2021-08-07LibCpp: Do lexing in the PreprocessorItamar
We now call Preprocessor::process_and_lex() and pass the result to the parser. Doing the lexing in the preprocessor will allow us to maintain the original position information of tokens after substituting definitions.
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-08-01Utilities: Remove unused header includesBrian Gianforcaro
2021-05-19LibCpp: Generalize ASTNode::dump() to support redirecting its outputItamar
Previously, ASTNode::dump() used outln() for output, which meant it always wrote its output to stdout. After this commit, ASTNode::dump() receives an 'output' argument (which is stdout by default). This enables writing the output to somewhere else. This will be useful for testing the LibCpp Parser with the output of ASTNode::dump.
2021-05-19Utilities: Rename CppParserTest => cpp-parserItamar
This is a utility program that runs the LibCpp parser on a program and dumps out the AST.