aboutsummaryrefslogtreecommitdiffstats
path: root/public/prism/prism-ichigojam.js
blob: 2ab971ebef4f2221bfc3dff8da423eca9a3b1f21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// according to the offical reference (EN)
// https://ichigojam.net/IchigoJam-en.html
Prism.languages.ichigojam = {
  comment: /(?:\B'|REM)(?:[^\n\r]*)/i,
  string: {
    pattern: /"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,
    greedy: true,
  },
  number: /\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
  keyword:
    /\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,
  function:
    /\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,
  label: /(?:\B@\S+)/,
  operator: /<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,
  punctuation: /[\[,;:()\]]/,
};
lass="w"> /^([ \t]*)#include\b.*/m, lookbehind: !0, alias: 'property', }, 'function-arg': { pattern: RegExp('(' + r.source + '\\s*\\(\\s*)[a-zA-Z]\\w*'), lookbehind: !0, alias: 'function', }, constraint: { pattern: /(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/, lookbehind: !0, inside: { expression: { pattern: /(=\s*)\S(?:\S|\s+(?!\s))*?(?=\s*(?:>$|,\s*\w+\s*=))/, lookbehind: !0, inside: null, }, property: /\b[a-z]\w*(?=\s*=)/i, operator: /=/, punctuation: /^<|>$|,/, }, }, keyword: [ { pattern: /\bdata(?=\s*\{)|\b(?:functions|generated|model|parameters|quantities|transformed)\b/, alias: 'program-block', }, /\b(?:array|break|cholesky_factor_corr|cholesky_factor_cov|complex|continue|corr_matrix|cov_matrix|data|else|for|if|in|increment_log_prob|int|matrix|ordered|positive_ordered|print|real|reject|return|row_vector|simplex|target|unit_vector|vector|void|while)\b/, r, ], function: /\b[a-z]\w*(?=\s*\()/i, number: /(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:E[+-]?\d+(?:_\d+)*)?i?(?!\w)/i, boolean: /\b(?:false|true)\b/, operator: /<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/, punctuation: /[()\[\]{},;]/, }), (e.languages.stan.constraint.inside.expression.inside = e.languages.stan); })(Prism);