Itamar
9e2e36724d
LibCpp: Add TemplatizedName
...
This type represents templatized names, and replaces our previous use
of 'TemplatizedType' and 'TemplatizedFunctionCall'.
Also, we now parse function calls as secondary expressions.
2021-04-06 21:51:58 +02:00
Itamar
e16036b9cc
LibCpp: Introduce DummyASTNode
...
This allows us to use pase_* methods inside match_* methods,
without adding any actual AST nodes to the m_nodes list.
2021-04-06 21:51:58 +02:00
Itamar
aa717e6a62
LibCpp: Parse C-Style parse expressions
2021-04-06 21:51:58 +02:00
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
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
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
1f9f6ea9d6
LibCpp: Support parsing function qualifiers
2021-04-06 21:51:58 +02:00
Itamar
0babb39cae
LibCpp: Parse variable declarations in global scope
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
8688259ed9
LanguageServers/Cpp: Support jumping to declaration of preprocessor
...
.. definitions.
2021-03-13 10:17:02 +01:00
Itamar
5b22f6f45a
LibCpp: Parser no longer holds the program's source
...
After we moved to storing the text of each token in the token itself,
we no longer have to store the source of the program in the Parser.
This makes more sense because the parser should deal with tokens, not
with raw source code.
2021-03-13 10:17:02 +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
97f2cd596b
LibCpp: Remove node_span_size, add index_of_node_at
2021-03-13 10:17:02 +01:00
Itamar
3658c4c567
LibCpp: Replace defined preprocessor values when parsing
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
5c79297b2c
LibCpp: Consume attribute specification when parsing
...
Consume __atribute__(...), without actually parsing its content.
2021-03-02 12:50:37 +01:00
Itamar
5a7abb8363
LibCpp: Parse type qualifiers
2021-03-02 12:50:37 +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
8ace2cfa18
LibCpp: Fix lexing & parsing of non-terminated strings
2021-02-13 19:50:09 +01:00
Itamar
ef9bfbd383
LanguageServers/Cpp: Autocomplete declarations from included headers
...
We now also look at the available declarations from included header
files when autocompleting names.
Additionally, you can now request autocomplete on an empty token, which
brings up all available names, starting from the inner-most scope.
2021-02-10 23:09:40 +01:00
Itamar
8ed65d7b48
LibCpp: Parse If statements
2021-02-08 23:10:38 +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