Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %YAML 1.2
- ---
- name: FullProf PCR
- scope: source.pcr
- file_extensions: [pcr]
- variables:
- number: '-?\d+(\.\d+)?([eE][+-]\d+)?'
- zeroes: '-?0\.0+([eE][+-]\d+)?'
- element: '[A-Z][A-Za-z0-9+\-]*'
- contexts:
- main:
- - match: '(?i)^!(?=\s*Atom)'
- scope: punctuation.definition.comment.pcr
- push: atomic-comment
- - match: '^!'
- scope: punctuation.definition.comment.pcr
- push: generic-comment
- end-block:
- - match: '^(?=\!)'
- pop: true
- inline-comment:
- - match: '!'
- scope: punctuation.definition.comment.pcr
- push:
- - meta_scope: comment.line.pcr
- - match: '\n'
- pop: true
- values:
- - match: '{{number}}'
- scope: constant.other.pcr
- codewords:
- - match: '{{zeroes}}'
- scope: comment.line.pcr
- - match: '{{number}}'
- scope: keyword.control.pcr
- # Generic lines :
- # - comment
- # - values
- # - codewords (optional)
- generic-comment:
- - meta_scope: comment.line.pcr
- - match: '\n'
- set: generic-values
- generic-values:
- - meta_content_scope: meta.generic-values.pcr
- - include: end-block
- - include: inline-comment
- - include: values
- - match: '\n'
- set: generic-codewords
- generic-codewords:
- - meta_content_scope: meta.generic-codewords.pcr
- - include: end-block
- - include: inline-comment
- - include: codewords
- - match: '\n'
- pop: true
- # Atomic content lines :
- # - comment
- # - values
- # - codewords
- # - values
- # - codewords
- # - etc.
- atomic-comment:
- - meta_scope: comment.line.pcr
- - match: '\n'
- set: atomic-values
- atomic-values:
- - meta_scope: meta.atomic-values.pcr
- - include: end-block
- - include: inline-comment
- - match: '{{element}}'
- scope: string.unquoted
- - include: values
- - match: '\n'
- set: atomic-codewords
- atomic-codewords:
- - meta_scope: meta.atomic-codewords.pcr
- - include: end-block
- - include: inline-comment
- - include: codewords
- - match: '\n'
- set: atomic-values
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement