Commit graph

24 commits

Author SHA1 Message Date
Itamar
44833f1621 LibCpp: Parse braced initialization list 2021-04-06 21:51:58 +02:00
Itamar
fc503b1368 LibCpp: Parse sizeof() expression 2021-04-06 21:51:58 +02:00
Itamar
575d6a8ee1 LibCpp: Parse Bitwise & Logical Or & And operators 2021-04-06 21:51:58 +02:00
Itamar
8962581c9c LibCpp: Parse C++ cast expressions
parse static_cast, reinterpret_cast, dynamic_cast & const_cast
2021-04-06 21:51:58 +02:00
Itamar
646aaa111b LibCpp: Support parsing templatized function calls 2021-04-06 21:51:58 +02:00
Itamar
fe4122bbae LibCpp: Support parsing '!=" operator 2021-04-06 21:51:58 +02:00
Itamar
3295609aea LibCpp: Add AST::Name
A Name node is basically an identifier with an optional scope,
e.g Core::File.
2021-04-06 21:51:58 +02:00
Itamar
29b6915db9 LibCpp: Parse templatized types
We can now parse things like Vector<int>
2021-04-06 21:51:58 +02:00
Itamar
9954a1837f LibCpp: Parse nullptr literal 2021-04-06 21:51:58 +02:00
Itamar
cbb49f26d9 LibCpp: Support parsing binary "==" Operator 2021-04-06 21:51:58 +02:00
Itamar
1f9f6ea9d6 LibCpp: Support parsing function qualifiers 2021-04-06 21:51:58 +02:00
Itamar
84e34d76d8 HackStudio+LanguageServers/Cpp: Show scope of symbols in Locator 2021-03-23 18:32:39 +01:00
Itamar
b5cab861e3 LibCpp: Parse Namespace declaration
Also, remove unused State::Context
2021-03-23 18:32:39 +01:00
Itamar
8a102fe3ec LibCpp: Implement Parser::text_in_range using text of tokens
It was previously implemented by directly iterating over the program's
source.
2021-03-13 10:17:02 +01:00
Itamar
1d3b5dabc3 LibCpp: Parse ellipsis
We can now parse the printf function declaration :^)
2021-03-02 12:50:37 +01:00
Itamar
5a7abb8363 LibCpp: Parse type qualifiers 2021-03-02 12:50:37 +01:00
Itamar
54bc9114b3 HackStudio: Support searching symbol declarations in the Locator
The Locator now keeps a cache of the declared symbol in a document.
The language client updates that cache whenever it gets an update from
the language server about declared symbols.

This allows searching for symbol declarations in the Locator, in
addition to file names.

Closes #5478
2021-02-27 16:37:35 +01:00
Itamar
a94b5376bc LanguageServers/Cpp: Update client asynchronously about symbols
As a document is parsed, the language server updates the client
asynchronously about symbol declarations it finds.
2021-02-27 16:37:35 +01:00
Andreas Kling
5d180d1f99 Everywhere: Rename ASSERT => VERIFY
(...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-23 20:56:54 +01:00
Itamar
d3ff82ba80 LibCpp: Store filename in ASTNodes
As part of the position information, we now also store the filename the
ASTNode belongs to.
2021-02-20 15:53:37 +01:00
Itamar
64c80f6ea4 LanguageServers/Cpp: Autocomplete function and struct/class names 2021-02-10 23:09:40 +01:00
Itamar
8ed65d7b48 LibCpp: Parse If statements 2021-02-08 23:10:38 +01:00
Ben Wiederhake
c9bb887c55 Everywhere: Remove unnecessary headers 1/4
Arbitrarily split up to make git bisect easier.

These unnecessary #include's were found by combining an automated tool (which
determined likely candidates) and some brain power (which decided whether
the #include is also semantically superfluous).

My favorite #include:

    #include "Applications/Piano/Music.h" // You can't have too much music in life!
2021-02-08 18:03:57 +01:00
Itamar
c96b6987c4 LibCpp: Add the beginning of a C++ parser
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-27 21:10:57 +01:00