Skip to content

Commit

Permalink
Ada: Changed attr-name to attribute; Use attr-name as alias (#3381
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hoonweiting authored Mar 12, 2022
1 parent c30b736 commit cde0b5b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
5 changes: 4 additions & 1 deletion components/prism-ada.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ Prism.languages.ada = {
pattern: /\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i
}
],
'attr-name': /\b'\w+/,
'attribute': {
pattern: /\b'\w+/,
alias: 'attr-name'
},
'keyword': /\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,
'boolean': /\b(?:false|true)\b/i,
'operator': /<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-ada.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Integer'Size
Character'Val
----------------------------------------------------
[
["variable", "Integer"], ["attr-name", "'Size"],
["variable", "Character"], ["attr-name", "'Val"]
]
----------------------------------------------------
Checks for attributes.
Integer'Size
Character'Val

----------------------------------------------------

[
["variable", "Integer"], ["attribute", "'Size"],
["variable", "Character"], ["attribute", "'Val"]
]

----------------------------------------------------

Checks for attributes.

0 comments on commit cde0b5b

Please sign in to comment.