diff options
author | Amr Hesham <amr96@programmer.net> | 2023-03-02 21:24:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-02 20:24:29 +0100 |
commit | 826dc600e8458a2a65c712492c48ec30a19fce2c (patch) | |
tree | 18bb219e8409b09a38a539b5f6216fa9e098a22c /tests | |
parent | 3ed18e5fe815b1334742a3a15b594aa07486acfd (diff) | |
download | pygments-git-826dc600e8458a2a65c712492c48ec30a19fce2c.tar.gz |
Add support for impl and constraint declaration in Carbon lexer (#2368)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/examplefiles/carbon/declarations.carbon | 9 | ||||
-rw-r--r-- | tests/examplefiles/carbon/declarations.carbon.output | 44 |
2 files changed, 52 insertions, 1 deletions
diff --git a/tests/examplefiles/carbon/declarations.carbon b/tests/examplefiles/carbon/declarations.carbon index 4f61d307..bcb9e05b 100644 --- a/tests/examplefiles/carbon/declarations.carbon +++ b/tests/examplefiles/carbon/declarations.carbon @@ -27,4 +27,11 @@ class Pal { abstract class MyAbstractClass { protected fn Create() -> partial Self { } -}
\ No newline at end of file +} + +constraint DrawVectorLegoFish { + impl as VectorLegoFish; + impl as Drawable; +} + +impl JustX as X {}
\ No newline at end of file diff --git a/tests/examplefiles/carbon/declarations.carbon.output b/tests/examplefiles/carbon/declarations.carbon.output index b1db4d97..48b1362f 100644 --- a/tests/examplefiles/carbon/declarations.carbon.output +++ b/tests/examplefiles/carbon/declarations.carbon.output @@ -242,3 +242,47 @@ '}' Punctuation '\n' Text.Whitespace + +'\n' Text.Whitespace + +'constraint' Keyword.Declaration +' ' Text.Whitespace +'DrawVectorLegoFish' Name.Other +' ' Text.Whitespace +'{' Punctuation +'\n' Text.Whitespace + +' ' Text.Whitespace +'impl' Keyword.Declaration +' ' Text.Whitespace +'as' Keyword +' ' Text.Whitespace +'VectorLegoFish' Name.Other +';' Punctuation +'\n' Text.Whitespace + +' ' Text.Whitespace +'impl' Keyword.Declaration +' ' Text.Whitespace +'as' Keyword +' ' Text.Whitespace +'Drawable' Name.Other +';' Punctuation +'\n' Text.Whitespace + +'}' Punctuation +'\n' Text.Whitespace + +'\n' Text.Whitespace + +'impl' Keyword.Declaration +' ' Text.Whitespace +'JustX' Name.Other +' ' Text.Whitespace +'as' Keyword +' ' Text.Whitespace +'X' Name.Other +' ' Text.Whitespace +'{' Punctuation +'}' Punctuation +'\n' Text.Whitespace |