Skip to content

Commit

Permalink
use new attribute naming
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Sep 22, 2024
1 parent 84438c2 commit 1a961b1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/languages/sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ export default function(hljs) {
const regex = hljs.regex;
const COMMENT_MODE = hljs.COMMENT('--', '$');
const STRING = {
className: 'string',
scope: 'string',
variants: [
{
begin: /'/,
end: /'/,
contains: [ { begin: /''/ } ]
contains: [ { match: /''/ } ]
}
]
};
const QUOTED_IDENTIFIER = {
begin: /"/,
end: /"/,
contains: [ { begin: /""/ } ]
contains: [ { match: /""/ } ]
};

const LITERALS = [
Expand Down Expand Up @@ -606,18 +606,18 @@ export default function(hljs) {
});

const VARIABLE = {
className: "variable",
begin: /@[a-z0-9][a-z0-9_]*/,
scope: "variable",
match: /@[a-z0-9][a-z0-9_]*/,
};

const OPERATOR = {
className: "operator",
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
scope: "operator",
match: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
relevance: 0,
};

const FUNCTION_CALL = {
begin: regex.concat(/\b/, regex.either(...FUNCTIONS), /\s*\(/),
match: regex.concat(/\b/, regex.either(...FUNCTIONS), /\s*\(/),
relevance: 0,
keywords: { built_in: FUNCTIONS }
};
Expand All @@ -636,7 +636,7 @@ export default function(hljs) {
)
}

const COMBOS_MODE = {
const MULTI_WORD_KEYWORDS = {
scope: "keyword",
match: kws_to_regex(COMBOS),
relevance: 0,
Expand Down Expand Up @@ -677,7 +677,7 @@ export default function(hljs) {
scope: "type",
match: kws_to_regex(MULTI_WORD_TYPES)
},
COMBOS_MODE,
MULTI_WORD_KEYWORDS,
FUNCTION_CALL,
VARIABLE,
STRING,
Expand Down

0 comments on commit 1a961b1

Please sign in to comment.