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/ioke | |
| parent | f0445be718da83541ea3401aad882f3937147263 (diff) | |
| download | pygments-git-examplefiles.tar.gz | |
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/ioke')
| -rw-r--r-- | tests/lexers/ioke/example.txt | 240 |
1 files changed, 240 insertions, 0 deletions
diff --git a/tests/lexers/ioke/example.txt b/tests/lexers/ioke/example.txt new file mode 100644 index 00000000..cc282879 --- /dev/null +++ b/tests/lexers/ioke/example.txt @@ -0,0 +1,240 @@ +---input--- +#!/usr/bin/ioke + +Ioke = LanguageExperiment with( + goal: :expressiveness, + data: as(code), + code: as(data), + features: [ + :dynamic, + :object_oriented, + :prototype_based, + :homoiconic, + :macros + ], + runtimes:(JVM, CLR), + inspirations: set(Io, Smalltalk, Ruby, Lisp) +) + +hello = method("Every example needs a hello world!", + name, + "hello, #{name}!" println) + +Ioke inspirations select( + features include?(:object_oriented) +) each(x, hello(x name)) + +---tokens--- +'#!/usr/bin/ioke\n' Comment + +'\n' Text + +'Ioke' Name.Variable +' ' Text +'=' Operator +' ' Text +'LanguageExperiment' Name.Class +' ' Text +'with' Keyword.Reserved +'(' Punctuation +'\n' Text + +' ' Text +'goal:' Literal.String.Other +' ' Text +':expressiveness' Literal.String.Symbol +',' Punctuation +'\n' Text + +' ' Text +'data:' Literal.String.Other +' ' Text +'as' Name +'(' Punctuation +'code' Name +')' Punctuation +',' Punctuation +'\n' Text + +' ' Text +'code:' Literal.String.Other +' ' Text +'as' Name +'(' Punctuation +'data' Name +')' Punctuation +',' Punctuation +'\n' Text + +' ' Text +'features:' Literal.String.Other +' ' Text +'[' Punctuation +'\n' Text + +' ' Text +':dynamic' Literal.String.Symbol +',' Punctuation +'\n' Text + +' ' Text +':object_oriented' Literal.String.Symbol +',' Punctuation +'\n' Text + +' ' Text +':prototype_based' Literal.String.Symbol +',' Punctuation +'\n' Text + +' ' Text +':homoiconic' Literal.String.Symbol +',' Punctuation +'\n' Text + +' ' Text +':macros' Literal.String.Symbol +'\n' Text + +' ' Text +']' Punctuation +',' Punctuation +'\n' Text + +' ' Text +'runtimes:' Literal.String.Other +'(' Punctuation +'JVM' Name.Class +',' Punctuation +' ' Text +'CLR' Name.Class +')' Punctuation +',' Punctuation +'\n' Text + +' ' Text +'inspirations:' Literal.String.Other +' ' Text +'set' Keyword.Reserved +'(' Punctuation +'Io' Name.Class +',' Punctuation +' ' Text +'Smalltalk' Name.Class +',' Punctuation +' ' Text +'Ruby' Name.Class +',' Punctuation +' ' Text +'Lisp' Name.Class +')' Punctuation +'\n' Text + +')' Punctuation +'\n' Text + +'\n' Text + +'hello' Name.Variable +' ' Text +'=' Operator +' ' Text +'method' Name.Function +'(' Punctuation +'"' Literal.String.Doc +'E' Literal.String.Doc +'v' Literal.String.Doc +'e' Literal.String.Doc +'r' Literal.String.Doc +'y' Literal.String.Doc +' ' Literal.String.Doc +'e' Literal.String.Doc +'x' Literal.String.Doc +'a' Literal.String.Doc +'m' Literal.String.Doc +'p' Literal.String.Doc +'l' Literal.String.Doc +'e' Literal.String.Doc +' ' Literal.String.Doc +'n' Literal.String.Doc +'e' Literal.String.Doc +'e' Literal.String.Doc +'d' Literal.String.Doc +'s' Literal.String.Doc +' ' Literal.String.Doc +'a' Literal.String.Doc +' ' Literal.String.Doc +'h' Literal.String.Doc +'e' Literal.String.Doc +'l' Literal.String.Doc +'l' Literal.String.Doc +'o' Literal.String.Doc +' ' Literal.String.Doc +'w' Literal.String.Doc +'o' Literal.String.Doc +'r' Literal.String.Doc +'l' Literal.String.Doc +'d' Literal.String.Doc +'!' Literal.String.Doc +'"' Literal.String.Doc +',' Punctuation +'\n' Text + +' ' Text +'name' Name +',' Punctuation +'\n' Text + +' ' Text +'"' Literal.String +'h' Literal.String +'e' Literal.String +'l' Literal.String +'l' Literal.String +'o' Literal.String +',' Literal.String +' ' Literal.String +'#{' Punctuation +'name' Name +'}' Punctuation +'!' Literal.String +'"' Literal.String +' ' Text +'println' Keyword +')' Punctuation +'\n' Text + +'\n' Text + +'Ioke' Name.Class +' ' Text +'inspirations' Name +' ' Text +'select' Name +'(' Punctuation +'\n' Text + +' ' Text +'features' Name +' ' Text +'include?' Name +'(' Punctuation +':object_oriented' Literal.String.Symbol +')' Punctuation +'\n' Text + +')' Punctuation +' ' Text +'each' Name +'(' Punctuation +'x' Name +',' Punctuation +' ' Text +'hello' Name +'(' Punctuation +'x' Name +' ' Text +'name' Name +')' Punctuation +')' Punctuation +'\n' Text |
