feat: more @keyword.type captures

This commit is contained in:
Riley Bruins 2024-04-23 12:23:15 -07:00 committed by Christian Clason
parent f0a1a13316
commit f58cae6c22
74 changed files with 395 additions and 239 deletions

View file

@ -35,7 +35,7 @@ using Cxx = import "c++.capnp";
$Cxx.namespace("capnproto_test::capnp::test");
enum TestEnum {
# <- @keyword
# <- @keyword.type
# ^^^^^^^^ @type
foo @0;
# ^^^ @constant
@ -51,7 +51,7 @@ enum TestEnum {
# <- @punctuation.bracket
struct TestAllTypes {
# <- @keyword
# <- @keyword.type
voidField @0 : Void;
# ^^^^^^^^^ @variable.member
# ^ @punctuation.special
@ -97,7 +97,7 @@ struct TestInterleavedGroups {
foo @0 :UInt32;
bar @2 :UInt64;
union {
# ^^^^^ @keyword
# ^^^^^ @keyword.type
qux @4 :UInt16;
corge :group {
# ^^^^^ @type
@ -114,7 +114,7 @@ struct TestInterleavedGroups {
}
group2 :group {
# ^^^^^ @keyword
# ^^^^^ @keyword.type
foo @1 :UInt32;
bar @3 :UInt64;
union {
@ -214,7 +214,7 @@ struct TestGenerics(Foo, Bar) {
qux @3 :Qux;
interface DeepNestInterface(Quux) {
# ^^^^^^^^^ @keyword
# ^^^^^^^^^ @keyword.type
# At one time this failed to compile.
call @0 () -> ();
# ^^^^ @function.method
@ -230,7 +230,7 @@ struct TestGenerics(Foo, Bar) {
}
annotation ann(struct) :Foo;
# ^^^^^^^^^^ @keyword
# ^^^^^^^^^^ @keyword.type
# ^^^ @function.method
# ^^^^^^ @variable.parameter.builtin

View file

@ -1,7 +1,7 @@
template <class T, class U>
concept Derived = std::is_base_of<U, T>::value;
// ^ @keyword
// ^ @keyword.type
// ^ @type.definition
template<typename T>

View file

@ -3,7 +3,7 @@ include: SomeFile.fusion
// ^ @string.special.url
namespace: ns = Neos.Fusion.Space
//<- @keyword
//<- @keyword.type
// ^ @module
// ^ @operator
// ^ @module

View file

@ -5,9 +5,9 @@ use function Space\Func\F as E;
// ^ @function
// ^ @function
use type Space\Type\T;
// ^ @keyword
// ^ @keyword.type
use namespace Space\Name\N as M;
// ^ @keyword
// ^ @keyword.type
// ^ @module
use namespace Space\Name2\N2, Space\Nothing\N3 as N8, type Space\Type2\N4,;

View file

@ -47,7 +47,7 @@ model Reaction {
}
enum ReactionType {
// ^ keyword
// ^ keyword.type
LIKE
HAHA
SAD

View file

@ -12,7 +12,7 @@ import * as something from "anotherFile";
/// @title Voting with delegation.
// <- @comment
contract Ballot {
// ^keyword
// ^keyword.type
// ^ @type
// This declares a new complex type which will
// be used for variables later.

View file

@ -44,17 +44,17 @@ Var.Assign padd = (CAddition const * volatile)&d
; ^ @variable
Var.Assign e1 = (enum e2)&e
; ^ @variable
; ^ @keyword
; ^ @keyword.type
; ^ @type
; ^ @variable
Var.Assign *vector = (struct Vector3d*)&acceleration
; ^ @variable
; ^ @keyword
; ^ @keyword.type
; ^ @type
; ^ @variable
Var.Assign z = (union foo)x
; ^ @variable
; ^ @keyword
; ^ @keyword.type
; ^ @type
; ^ @variable
Var.Assign b = -a

View file

@ -1,11 +1,11 @@
let
class A extends Object {}
/* <- @keyword */
/* <- @keyword.type */
/* ^ @keyword */
/* ^ @type.builtin */
type B = class extends A {
/* ^ @keyword */
/* ^ @keyword.type */
/* ^ @keyword */
/* ^ @type */

View file

@ -2,7 +2,7 @@ bring cloud;
// <- @keyword
class Foo {
// <- @keyword
// <- @keyword.type
// ^ @type
// ^ @punctuation.bracket
name: str;