Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added keywords: libname set output options #1784

Merged
merged 6 commits into from
Mar 2, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/prism-sas.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Prism.languages.sas = {
pattern: /(["'])(?:\1\1|(?!\1)[\s\S])*\1/,
greedy: true
},
'keyword': /\b(?:data|else|format|if|input|proc\s\w+|quit|run|then)\b/i,
'keyword': /\b(?:data|else|format|if|input|proc\s\w+|quit|run|then|libname|set|output|options)\b/i,
// Decimal (1.2e23), hexadecimal (0c1x)
'number': /\b(?:[\da-f]+x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,
'operator': /\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?|\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-sas.min.js

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

6 changes: 4 additions & 2 deletions tests/languages/sas/keyword_feature.test
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
data else format if
input proc run then
libname set output options

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

[
["keyword", "data"], ["keyword", "else"], ["keyword", "format"], ["keyword", "if"],
["keyword", "input"], ["keyword", "proc run"], ["keyword", "then"]
["keyword", "input"], ["keyword", "proc run"], ["keyword", "then"], ["keyword", "libname],
RunDevelopment marked this conversation as resolved.
Show resolved Hide resolved
["keyword", "set"], ["keyword", "output"], ["keyword", "options"]
]

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

Checks for all keywords.
Checks for all keywords.