Commit Graph

178 Commits (1c3c93d727c3bb833b224b062fd1f20eb085f962)

Author SHA1 Message Date
jdrouhard 9ad3202e7d Support for parameter pack expansions and improvements to lambda expressions (#60)
For information about parameter packs, see
https://en.cppreference.com/w/cpp/language/parameter_pack

Most expansion loci should work with this commit since it is implemented
as an expression, so anywhere an expression is valid, parameter pack
expansions will be parsed.

This commit also adds support for:
* The sizeof... operator (as an alternative to sizeof)
* Lambda captures can optionally start with a default capture along with
  other captures
* Lambda function declarators (the parameter list) are optional

Tests added for the following parameter pack expansion loci:
* Function parameter and argument lists
* Template argument lists
* Brace-enclosed initializers
* Base class specifiers and member initializer lists
* Lambda captures
2019-10-30 10:53:21 +07:00
jdrouhard 5ba6c37d72 Add support for alias templates (#59) 2019-10-04 14:21:07 +07:00
johnmiked15 7e00ca7c74 Various improvements to template parsing (#58)
This implements support for the following:
* Template constructors defined outside class definition (Fixes #50)
* Nested template function definitions outside class definition
* Template template parameters
* Name-specifiers are now (correctly) optional in template parameters
2019-09-30 19:38:40 +07:00
johnmiked15 e21d7ff7d8 Add default_method_clause to inline_method_definition (#57)
Fixes #48
2019-09-30 19:23:51 +07:00
calixteman f5afa0ee48 Add a base type for enums (#55)
* Add a base type for enums

* Add scoped type identifiers and handle enum class/struct
2019-08-06 17:23:46 +07:00
Max Brunsfeld 9f8ce312e2 Fix ambiguity for template calls w/ value parameters
Fixes #49
2019-06-24 12:15:18 +07:00
Max Brunsfeld 42dcb72c28 Add node fields 2019-06-24 12:06:48 +07:00
calixteman 89d917ae81 Handle throw and noexcept specifiers (#46)
* Handle throw and noexcept specifiers

* Don't change ts-c path
2019-06-07 14:28:11 +07:00
calixteman 96a320b628 Handler initializer list in for loop (#44) 2019-06-05 12:47:05 +07:00
calixteman def9e6f60d Handle throw (#43)
* Fix ctor/dtor with attributes

* Handle 'throw'
2019-06-05 10:22:35 +07:00
calixteman 300b739bb1 Fix virtual issues for method declaration/definition (#39) 2019-06-04 11:48:12 +07:00
Max Brunsfeld df7bc44e33 Allow structured binding declarators in pmore places
Refs atom/language-c#325
2019-05-08 15:51:47 +07:00
Max Brunsfeld 03f36b8b29 Allow attributes on methods
Fixes atom/language-c#313
2019-04-18 13:53:36 +07:00
Max Brunsfeld e54a86a62e Add attribute specifiers
Fixes #33
2019-04-18 13:34:01 +07:00
Max Brunsfeld 4837c1c837 Add virtual specifier
Refs #33
2019-04-18 13:24:51 +07:00
Max Brunsfeld 57dd274de6 Regenerate with latest tree-sitter-c 2018-12-02 14:30:40 +07:00
Max Brunsfeld 95439ea4cc Add support for default member initializers
Fixes #23
2018-11-18 13:37:20 +07:00
Max Brunsfeld 1d0fdd0aad Add variadic template and function parameters
Fixes #20
2018-11-14 17:41:24 +07:00
Max Brunsfeld a2cd752b28 Fix parsing of nested classes with inheritance
Fixes #22
2018-11-14 17:08:10 +07:00
Max Brunsfeld ddd28aa68b Fix parsing of new expressions with no argument lists
Fixes tree-sitter/tree-sitter#208
2018-10-29 13:55:17 +07:00
Max Brunsfeld 64d9263832 Update tree-sitter-c 2018-10-28 13:36:42 +07:00
Max Brunsfeld 71bf2098a4 Add try statements
Fixes #16
2018-10-01 10:23:47 +07:00
Max Brunsfeld b43899edba Add default and delete method specifiers
Fixes #17
2018-10-01 10:11:31 +07:00
Max Brunsfeld b673eceee3 Support template value params with optional names
Fixes #9
2018-08-23 17:24:33 +07:00
Andrew Sutherland ce35ac90eb Add support for method virtual specifiers.
This expands on #6 to support override/final for functions

The relevant specs are:
https://en.cppreference.com/w/cpp/language/override
https://en.cppreference.com/w/cpp/language/final
2018-07-31 13:16:17 +07:00
Andrew Sutherland 61ec3b9008 C++11 class-virt-specifier: "class A final"
As documented at https://en.cppreference.com/w/cpp/language/final (3)
and https://en.wikipedia.org/wiki/C%2B%2B11#Explicit_overrides_and_final
in the latter part, C++11 made syntax like "struct A final {}" legal.
2018-05-31 16:11:30 +07:00
Max Brunsfeld 3a76511be9 Add constexpr if statements
Co-Authored-By: Thomas Johansen <thomasjo@gmail.com>
2018-05-14 13:43:15 +07:00
Max Brunsfeld 743d6de28d Allow template argument lists to be empty
Co-Authored-By: Thomas Johansen <thomasjo@gmail.com>
2018-05-14 13:36:11 +07:00
Max Brunsfeld 5066474dbb Add dependent type names
Co-Authored-By: Thomas Johansen <thomasjo@gmail.com>
2018-05-14 13:34:16 +07:00
Max Brunsfeld aed6de49a4 ⬆️ tree-sitter-c to allow preproc conditionals in class defs
Co-Authored-By: Thomas Johansen <thomasjo@gmail.com>
2018-05-14 13:23:19 +07:00
Max Brunsfeld dfd266b27f Allow explicit constructors
Co-Authored-By: Thomas Johansen <thomasjo@gmail.com>
2018-05-14 12:52:14 +07:00
Max Brunsfeld 06e557ada7 Allow templates with optional type parameters
Co-Authored-By: Thomas Johansen <thomasjo@gmail.com>
2018-05-14 12:33:52 +07:00
Max Brunsfeld 64ac620f5d Add the constexpr type qualifier
Co-Authored-By: Thomas Johansen <thomasjo@gmail.com>
2018-05-14 12:21:08 +07:00
Max Brunsfeld 9dab393b10 Add c++17 structured binding declarations 2018-04-23 11:33:41 +07:00
Max Brunsfeld c17905d04f Differentiate template methods from template functions 2018-02-15 17:15:05 +07:00
Max Brunsfeld 4abee33b91 Update conflict to reflect tree-sitter-c initializer_list change 2018-02-10 14:33:06 +07:00
Max Brunsfeld a1168f46a2 Add raw string literals 2018-01-09 12:03:13 +07:00
Max Brunsfeld 63b48817a0 Add nullptr, primitive types, constants 2017-10-04 12:27:46 +07:00
Max Brunsfeld e6dfce698a Boost dynamic precedence of argument list, like in C 2017-10-04 11:46:25 +07:00
Max Brunsfeld 12b2232560 Tweak identifier naming 2017-08-01 21:08:02 +07:00
Max Brunsfeld 69a3ef688a Use new alias API 2017-07-31 17:46:36 +07:00
Max Brunsfeld 58b68438ab Improve differentiation between types and variables 2017-07-24 19:59:00 +07:00
Max Brunsfeld a38155d4f8 Start separating variable, type, and field names 2017-07-20 15:38:40 +07:00
Max Brunsfeld 9f6f3ae509 Add r-value references 2017-06-22 22:13:15 +07:00
Max Brunsfeld 8694f5beb2 Add classes with inheritance 2017-06-22 22:10:23 +07:00
Max Brunsfeld 53a18a46ae Add explicit template instantiations 2017-06-22 21:52:26 +07:00
Max Brunsfeld 67e93f50e6 Add declarations with braced initializer lists 2017-06-22 16:37:48 +07:00
Max Brunsfeld 4892ecbbc1 Add scoped classes definitions, using namespace declarations 2017-06-21 15:19:59 +07:00
Max Brunsfeld 39e3810038 Add friend, using, alias declarations inside classes 2017-06-21 15:05:06 +07:00
Max Brunsfeld 0e2af7283f Add template class/struct declarations 2017-06-21 14:35:39 +07:00
Max Brunsfeld ef62bdcd80 Add default parameter values 2017-06-21 14:29:54 +07:00
Max Brunsfeld 9156173478 Allow constructor and destructor declarations 2017-06-21 14:22:29 +07:00
Max Brunsfeld 928a408a63 Add class declarations, inline method definitions 2017-06-21 12:39:27 +07:00
Max Brunsfeld 4813709fd9 Add alias declarations 2017-06-21 11:48:21 +07:00
Max Brunsfeld dba3534a27 Allow unparenthesized template calls as types in composite literals 2017-06-21 11:40:47 +07:00
Max Brunsfeld 989e5a6d94 Add basic lambda expressions 2017-06-21 11:25:05 +07:00
Max Brunsfeld f9e0cb1d52 Allow initializer lists in argument lists 2017-06-20 16:41:57 +07:00
Max Brunsfeld 88bc200208 Allow template calls as declarators 2017-06-20 16:24:56 +07:00
Max Brunsfeld 3f5404e421 Add basic template declarations 2017-06-20 16:22:45 +07:00
Max Brunsfeld fe90d2a735 Add destructor definitions 2017-06-20 16:10:32 +07:00
Max Brunsfeld b584a472b9 Add new and delete expressions 2017-06-20 16:05:30 +07:00
Max Brunsfeld 491904ccb6 Add explicit destructor calls 2017-06-20 15:55:55 +07:00
Max Brunsfeld 7781ce4b99 Add noexcept qualifier to function declarators 2017-06-20 15:43:00 +07:00
Max Brunsfeld 771e42c979 Add unparenthesized compound literal expressions 2017-06-20 15:39:25 +07:00
Max Brunsfeld 01621757ad Add range-based for loops 2017-06-20 15:34:16 +07:00
Max Brunsfeld e56054b548 📝 2017-06-20 15:23:01 +07:00
Max Brunsfeld 7cbcd845d2 Add operator overload declarations 2017-06-20 15:17:26 +07:00
Max Brunsfeld b7e43ef297 Add namespaced function definitions and constructor definitions 2017-06-20 14:47:28 +07:00
Max Brunsfeld f8947ed3f8 Add namespaced types 2017-06-20 13:32:48 +07:00
Max Brunsfeld 68358e4d57 Add reference declarations 2017-06-20 13:31:24 +07:00
Max Brunsfeld 64bd406812 Add the auto type 2017-06-20 13:23:20 +07:00
Max Brunsfeld e0af0bdecb Allow namespaced identifiers as expressions 2017-06-20 12:34:25 +07:00
Max Brunsfeld 9ed83065cc Allow return statements with initializer lists 2017-06-20 12:28:14 +07:00
Max Brunsfeld 92c7ff481f Add using declarations 2017-06-20 10:49:06 +07:00
Max Brunsfeld 03b1da6a8b Add namespace definitions 2017-06-20 10:27:44 +07:00
Max Brunsfeld 282c634c1e Remove unnecessary conflict 2017-06-20 10:22:07 +07:00
Max Brunsfeld 00c03c41ec Update tree-sitter-cli, tree-sitter-c 2017-06-20 10:19:43 +07:00
Max Brunsfeld d896682201 Initial commit 2016-01-15 11:05:04 +07:00