Changeset 11781 for utils/developer/fortran.py
- Timestamp:
- 2019-10-23T21:02:18+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utils/developer/fortran.py
r11779 r11781 40 40 tokens = { 41 41 'root': [ 42 (r'^#.*\n', Comment.Preproc), 43 (r'^&[a-z]\w*', Name.Namespace, 'namelist'), 44 (r'!.*\n', Comment), 45 include('strings'), 42 include('cmt' ), 43 include('nlst'), 44 include('str' ), 45 include('bool'), 46 include('opr' ), 47 include('punc'), 46 48 include('core'), 47 49 (r'[a-z][\w$]*', Name), 48 include('num s'),50 include('num'), 49 51 (r'[\s]+', Text), 52 ], 53 'cmt': [ 54 (r'^#.*\n', Comment.Preproc), 55 (r'!.*\n', Comment), 50 56 ], 51 57 'core': [ … … 85 91 Keyword.Type), 86 92 87 # Operators 88 (r'(\*\*|\*|\+|-|\/|<|>|<=|>=|==|\/=|=)', Operator), 89 90 # 93 # 91 94 (r'(::)', Keyword.Declaration), 92 95 … … 144 147 'ZLog', 'ZSin', 'ZSqRt'), prefix=r'\b', suffix=r'\s*\b'), 145 148 Name.Builtin), 146 149 ], 150 'bool': [ 147 151 # Booleans 148 (r'\.(true|false)\.', Name.Builtin), 152 (r'\.(true|false)\.', Keyword.Constant), 153 ], 154 'opr': [ 155 # Operators 156 (r'(\*\*|\*|\+|-|\/|<|>|<=|>=|==|\/=|=)', Operator), 149 157 150 158 # Comparing Operators 151 159 (r'\.(eq|ne|lt|le|gt|ge|not|and|or|eqv|neqv)\.', Operator.Word), 152 160 ], 161 'punc': [ 153 162 # Punctuation 154 (r'[()\[\],:&%;.]', Punctuation), 155 ], 156 'namelist': [ 157 (r'!.*\n', Comment), 158 (r'([a-z]\w*)(\()?(\s*)?(\d*)?(\s*)?(\))?(%[a-z]\w*)?(\s*)(=)', bygroups( 159 Name.Variable, Punctuation, Text, Number.Integer, Text, Punctuation, 160 Name.Variable, Text, Operator)), 161 (r'(\*\*|\*|\+|-|\/|<|>|<=|>=|==|\/=|=)', Operator), 162 (r'\.(true|false)\.', Name.Builtin), 163 include('strings'), 164 include('nums'), 165 (r'[()\[\],:&%;.]', Punctuation), 166 (r'[\s]+', Text), 163 (r'[()\[\],:%;.]', Punctuation), 164 (r'&(?=\s)' , Punctuation), 165 ], 166 'nlst': [ 167 (r'^&[a-z]\w*', Name.Namespace), 168 # include('cmt'), 169 (r'^(\s*)([a-z]\w*)(\()?(\s*)?(\d*)?(\s*)?(\))?(%[a-z]\w*)?(\s*)(=)', 170 bygroups(Text, Name.Variable, 171 Punctuation , Text, Number.Integer, Text, Punctuation, 172 Name.Variable, 173 Text, Operator )), 174 (r'([+-])', Operator), 167 175 (r'^\/$', Name.Namespace), 168 176 ], 169 'str ings': [177 'str': [ 170 178 (r'(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double), 171 179 (r"(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single), 172 180 ], 173 'num s': [181 'num': [ 174 182 (r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer), 175 183 (r'[+-]?\d*\.\d+([ed][-+]?\d+)?(_[a-z]\w+)?', Number.Float),
Note: See TracChangeset
for help on using the changeset viewer.