rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.32k stars 731 forks source link

Praat: matrix types and string vector types are marked as errors #1819

Closed Syuparn closed 2 years ago

Syuparn commented 2 years ago

Name of the lexer

Praat

Code sample

# matrix type
a## = zero##(100, 10000)

# string vector type
text$# = readLinesFromFile$#("hello.txt")

# literals
a## = {{1, 2}, {3, 4}}
text$# = {"foo", "bar"}

http://rouge.jneen.net/v3.28.0/praat/IyBtYXRyaXggdHlwZQphIyMgPSB6ZXJvIyMoMTAwLCAxMDAwMCkKCiMgc3RyaW5nIHZlY3RvciB0eXBlCnRleHQkIyA9IHJlYWRMaW5lc0Zyb21GaWxlJCMoImhlbGxvLnR4dCIpCgojIGxpdGVyYWxzCmEjIyA9IHt7MSwgMn0sIHszLCA0fX0KdGV4dCQjID0geyJmb28iLCAiYmFyIn0KCg

Additional context

Matrix type (mat##) and string vector type (sv$#) are introduced in Praat 6 (reference). Adding rules for these types (variable suffixes, function suffixes, and literal {}) will solve this problem.