summaryrefslogtreecommitdiff
path: root/pygments/lexer.py
diff options
context:
space:
mode:
authorMasen Furer <devnull@localhost>2013-01-11 19:07:52 -0800
committerMasen Furer <devnull@localhost>2013-01-11 19:07:52 -0800
commitd1bf5aa4a25005e8630bb639053c4340475bff6e (patch)
tree22160b51fceb3c14393114ba695f9b89830e22b4 /pygments/lexer.py
parent852c13d0adecc3b618a3d8a7297aead53b1bb2e5 (diff)
downloadpygments-d1bf5aa4a25005e8630bb639053c4340475bff6e.tar.gz
AdaLexer: fix support for record types
In the previous implementation, a record type would trigger a descent into 'formal_part' which is for formal parameter lists in a task, procedure, or function declaration. The 'formal_part' is inappropriate for the record type, which lists Variable_Name : Variable_Type for all members of the record, like the declaration section of a procedure. Now the code can take advantage of highlighting built-in types for record declarations. Further, the 'formal_part' only pops on a right paren \) This doesn't work for record declarations which end with a 'end record'. The previous implementation caused highlighting inconsistencies after a record declaration because the lexer would get stuck in 'formal_part' and wouldn't pop on 'end record' Finally, null records would also exhibit the same behavior described, however a null record declaration doesn't contain an 'end record'. It is a shorthand notation which has been special-cased into 'type_def'. For a comparison, look at output before and after this commit on: tests/examplefiles/test.adb
Diffstat (limited to 'pygments/lexer.py')
0 files changed, 0 insertions, 0 deletions