Commit e7bf6512 authored by Robert Bradshaw's avatar Robert Bradshaw

Add type qualifiers to the grammar.

parent ecffe6f6
......@@ -146,9 +146,13 @@ yield_expr: 'yield' [testlist]
# Cython extensions
type: NAME
maybe_typed_name: NAME [('.' NAME)* NAME]
type: ['const'] NAME ['complex'] [type_qualifiers]
maybe_typed_name: ['const'] NAME [('.' NAME)* ['complex'] [type_qualifiers] NAME]
teplate_params: '[' NAME (',' NAME)* ']'
type_qualifiers: type_qualifier+
type_qualifier: '*' | '**' | '&' | type_index
type_index: '[' [(NUMBER | type (',' type)* | (memory_view_index (',' memory_view_index)*))] ']' # TODO: old buffer syntax
memory_view_index: ':' [':'] [NUMBER]
address: '&' factor
cast: '<' type ['?'] '>' factor
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment