Update docs for structs and objects
This commit is contained in:
@@ -64,7 +64,7 @@ function highlightSolstice(code) {
|
||||
const word = code.substring(i, end);
|
||||
|
||||
// Check what type of word it is
|
||||
if (['def', 'if', 'while', 'return', 'ground', 'puts'].includes(word)) {
|
||||
if (['def', 'if', 'while', 'return', 'ground', 'puts', 'def', 'struct', 'new'].includes(word)) {
|
||||
result += `<span class="keyword">${word}</span>`;
|
||||
} else if (['input', 'print', 'println'].includes(word)) {
|
||||
result += `<span class="builtin">${word}</span>`;
|
||||
@@ -87,7 +87,7 @@ function highlightSolstice(code) {
|
||||
}
|
||||
|
||||
// Check for operators
|
||||
else if ('+-*/=!<>'.includes(code[i])) {
|
||||
else if ('+-*/=!<>:'.includes(code[i])) {
|
||||
let op = code[i];
|
||||
if (i + 1 < code.length && '='.includes(code[i + 1])) {
|
||||
op += code[i + 1];
|
||||
|
||||
Reference in New Issue
Block a user