diff options
| author | Georg Brandl <georg@python.org> | 2021-01-18 21:24:00 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2021-01-18 22:08:36 +0100 |
| commit | 2a3d3a7d5b9c60dedf6638d876161d9563faebcf (patch) | |
| tree | 809c0b4a686db98f5954afa1944404cd9652c6b2 /tests/lexers/bare/example.txt | |
| parent | f0445be718da83541ea3401aad882f3937147263 (diff) | |
| download | pygments-git-examplefiles.tar.gz | |
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/bare/example.txt')
| -rw-r--r-- | tests/lexers/bare/example.txt | 259 |
1 files changed, 259 insertions, 0 deletions
diff --git a/tests/lexers/bare/example.txt b/tests/lexers/bare/example.txt new file mode 100644 index 00000000..30669ea9 --- /dev/null +++ b/tests/lexers/bare/example.txt @@ -0,0 +1,259 @@ +---input--- +type PublicRSAKey data<128> +type PublicED25519Key data<32> +type Time string # ISO 8601 + +enum Department { + ACCOUNTING + ADMINISTRATION + CUSTOMER_SERVICE + DEVELOPMENT # IMPORTANT + + # Reserved for the CEO + JSMITH = 99 +} + +type Customer { + name: string + email: string + address: Address + orders: []{ + orderId: i64 + quantity: i32 + } + metadata: map[string]data +} + +type Employee { + name: string + email: string + address: Address + department: Department + hireDate: Time + publicKey: optional<(PublicRSAKey | PublicED25519Key)> + metadata: map[string]data +} + +type Person (Customer | Employee) + +type Address { + address: [4]string + city: string + state: string + country: string +} + +---tokens--- +'type' Keyword +' ' Text +'PublicRSAKey' Name +' ' Text +'data' Keyword +'<' Text +'128' Literal +'>' Text +'\n' Text + +'type' Keyword +' ' Text +'PublicED25519Key' Name +' ' Text +'data' Keyword +'<' Text +'32' Literal +'>' Text +'\n' Text + +'type' Keyword +' ' Text +'Time' Name +' ' Text +'string' Keyword +' ' Text +'# ISO 8601' Comment +'\n\n' Text + +'enum' Keyword +' ' Text +'Department' Name.Class +' {' Text +'\n ' Text +'ACCOUNTING' Name.Attribute +'\n ' Text +'ADMINISTRATION' Name.Attribute +'\n ' Text +'CUSTOMER_SERVICE' Name.Attribute +'\n ' Text +'DEVELOPMENT' Name.Attribute +' ' Text +'# IMPORTANT' Comment +'\n\n ' Text +'# Reserved for the CEO' Comment +'\n ' Text +'JSMITH' Name.Attribute +' = ' Text +'99' Literal +'\n' Text + +'}' Text +'\n\n' Text + +'type' Keyword +' ' Text +'Customer' Name.Class +' {' Text +'\n ' Text +'name' Name.Attribute +': ' Text +'string' Keyword +'\n' Text + +' ' Text +'email' Name.Attribute +': ' Text +'string' Keyword +'\n' Text + +' ' Text +'address' Name.Attribute +': ' Text +'Address' Name.Class +'\n' Text + +' ' Text +'orders' Name.Attribute +': ' Text +'[]' Text +'{' Text +'\n ' Text +'orderId' Name.Attribute +': ' Text +'i64' Keyword +'\n' Text + +' ' Text +'quantity' Name.Attribute +': ' Text +'i32' Keyword +'\n' Text + +' ' Text +'}' Text +'\n' Text + +' ' Text +'metadata' Name.Attribute +': ' Text +'map' Keyword +'[' Text +'string' Keyword +']' Text +'data' Keyword +'\n' Text + +'}' Text +'\n\n' Text + +'type' Keyword +' ' Text +'Employee' Name.Class +' {' Text +'\n ' Text +'name' Name.Attribute +': ' Text +'string' Keyword +'\n' Text + +' ' Text +'email' Name.Attribute +': ' Text +'string' Keyword +'\n' Text + +' ' Text +'address' Name.Attribute +': ' Text +'Address' Name.Class +'\n' Text + +' ' Text +'department' Name.Attribute +': ' Text +'Department' Name.Class +'\n' Text + +' ' Text +'hireDate' Name.Attribute +': ' Text +'Time' Name.Class +'\n' Text + +' ' Text +'publicKey' Name.Attribute +': ' Text +'optional' Keyword +'<' Text +'(' Text +'PublicRSAKey' Name.Class +' | ' Text +'PublicED25519Key' Name.Class +')' Text +'>' Text +'\n' Text + +' ' Text +'metadata' Name.Attribute +': ' Text +'map' Keyword +'[' Text +'string' Keyword +']' Text +'data' Keyword +'\n' Text + +'}' Text +'\n\n' Text + +'type' Keyword +' ' Text +'Person' Name.Class +' (' Text +'Customer' Name.Class +' | ' Text +'Employee' Name.Class +')' Text +'\n\n' Text + +'type' Keyword +' ' Text +'Address' Name.Class +' {' Text +'\n ' Text +'address' Name.Attribute +': ' Text +'[' Text +'4' Literal +']' Text +'string' Keyword +'\n' Text + +' ' Text +'city' Name.Attribute +': ' Text +'string' Keyword +'\n' Text + +' ' Text +'state' Name.Attribute +': ' Text +'string' Keyword +'\n' Text + +' ' Text +'country' Name.Attribute +': ' Text +'string' Keyword +'\n' Text + +'}' Text +'\n' Text |
