Added support for OpenQasm (#2797)
This commit is contained in:
parent
f9b69528f9
commit
1a2347a3b6
File diff suppressed because one or more lines are too long
|
@ -850,6 +850,11 @@
|
|||
],
|
||||
"owner": "Milania1"
|
||||
},
|
||||
"openqasm": {
|
||||
"title": "OpenQasm",
|
||||
"alias": "qasm",
|
||||
"owner": "RunDevelopment"
|
||||
},
|
||||
"oz": {
|
||||
"title": "Oz",
|
||||
"owner": "Golmote"
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
// https://qiskit.github.io/openqasm/grammar/index.html
|
||||
|
||||
Prism.languages.openqasm = {
|
||||
'comment': /\/\*[\s\S]*?\*\/|\/\/.*/,
|
||||
'string': {
|
||||
pattern: /"[^"\r\n\t]*"|'[^'\r\n\t]*'/,
|
||||
greedy: true
|
||||
},
|
||||
|
||||
'keyword': /\b(?:barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while|CX|OPENQASM|U)\b|#pragma\b/,
|
||||
'class-name': /\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,
|
||||
'function': /\b(?:sin|cos|tan|exp|ln|sqrt|rotl|rotr|popcount)\b(?=\s*\()/,
|
||||
|
||||
'constant': /\b(?:pi|tau|euler)\b|[π𝜏ℇ]/,
|
||||
'number': {
|
||||
pattern: /(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,
|
||||
lookbehind: true
|
||||
},
|
||||
'operator': /->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,
|
||||
'punctuation': /[(){}\[\];,:.]/
|
||||
};
|
||||
|
||||
Prism.languages.qasm = Prism.languages.openqasm;
|
|
@ -0,0 +1 @@
|
|||
Prism.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while|CX|OPENQASM|U)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:sin|cos|tan|exp|ln|sqrt|rotl|rotr|popcount)\b(?=\s*\()/,constant:/\b(?:pi|tau|euler)\b|[π𝜏ℇ]/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},Prism.languages.qasm=Prism.languages.openqasm;
|
|
@ -0,0 +1,43 @@
|
|||
<h2>Full example</h2>
|
||||
<pre class="language-cpp"><code>// https://github.com/Qiskit/openqasm
|
||||
/*
|
||||
* Repeat-until-success circuit for Rz(theta),
|
||||
* cos(theta-pi)=3/5, from Nielsen and Chuang, Chapter 4.
|
||||
*/
|
||||
OPENQASM 3;
|
||||
include "stdgates.inc";
|
||||
|
||||
/*
|
||||
* Applies identity if out is 01, 10, or 11 and a Z-rotation by
|
||||
* theta + pi where cos(theta)=3/5 if out is 00.
|
||||
* The 00 outcome occurs with probability 5/8.
|
||||
*/
|
||||
def segment qubit[2]:anc, qubit:psi -> bit[2] {
|
||||
bit[2] b;
|
||||
reset anc;
|
||||
h anc;
|
||||
ccx anc[0], anc[1], psi;
|
||||
s psi;
|
||||
ccx anc[0], anc[1], psi;
|
||||
z psi;
|
||||
h anc;
|
||||
measure anc -> b;
|
||||
return b;
|
||||
}
|
||||
|
||||
qubit input;
|
||||
qubit ancilla[2];
|
||||
bit flags[2] = "11";
|
||||
bit output;
|
||||
|
||||
reset input;
|
||||
h input;
|
||||
|
||||
// braces are optional in this case
|
||||
while(int(flags) != 0) {
|
||||
flags = segment ancilla, input;
|
||||
}
|
||||
rz(pi - arccos(3 / 5)) input;
|
||||
h input;
|
||||
output = measure input; // should get zero
|
||||
</code></pre>
|
|
@ -205,6 +205,7 @@
|
|||
"n4jsd": "n4js",
|
||||
"nani": "naniscript",
|
||||
"objc": "objectivec",
|
||||
"qasm": "openqasm",
|
||||
"objectpascal": "pascal",
|
||||
"px": "pcaxis",
|
||||
"pcode": "peoplecode",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -147,6 +147,8 @@
|
|||
"objc": "Objective-C",
|
||||
"ocaml": "OCaml",
|
||||
"opencl": "OpenCL",
|
||||
"openqasm": "OpenQasm",
|
||||
"qasm": "OpenQasm",
|
||||
"parigp": "PARI/GP",
|
||||
"objectpascal": "Object Pascal",
|
||||
"psl": "PATROL Scripting Language",
|
||||
|
|
|
@ -1 +1 @@
|
|||
!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var a,s=t.getAttribute("data-language")||i[e.language]||((a=e.language)?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}();
|
||||
!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}();
|
|
@ -0,0 +1,29 @@
|
|||
angle
|
||||
bit
|
||||
bool
|
||||
creg
|
||||
fixed
|
||||
float
|
||||
int
|
||||
length
|
||||
qreg
|
||||
qubit
|
||||
stretch
|
||||
uint
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["class-name", "angle"],
|
||||
["class-name", "bit"],
|
||||
["class-name", "bool"],
|
||||
["class-name", "creg"],
|
||||
["class-name", "fixed"],
|
||||
["class-name", "float"],
|
||||
["class-name", "int"],
|
||||
["class-name", "length"],
|
||||
["class-name", "qreg"],
|
||||
["class-name", "qubit"],
|
||||
["class-name", "stretch"],
|
||||
["class-name", "uint"]
|
||||
]
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
comment
|
||||
*/
|
||||
|
||||
// comment
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "/*\r\n comment\r\n */"],
|
||||
|
||||
["comment", "// comment"]
|
||||
]
|
|
@ -0,0 +1,9 @@
|
|||
pi tau euler
|
||||
π τ ℇ
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["constant", "pi"], ["constant", "tau"], ["constant", "euler"],
|
||||
["constant", "π"], " τ ", ["constant", "ℇ"]
|
||||
]
|
|
@ -0,0 +1,79 @@
|
|||
barrier
|
||||
boxas
|
||||
boxto
|
||||
break
|
||||
const
|
||||
continue
|
||||
ctrl
|
||||
def
|
||||
defcal
|
||||
defcalgrammar
|
||||
delay
|
||||
else
|
||||
end
|
||||
for
|
||||
gate
|
||||
gphase
|
||||
if
|
||||
in
|
||||
include
|
||||
inv
|
||||
kernel
|
||||
lengthof
|
||||
let
|
||||
measure
|
||||
pow
|
||||
reset
|
||||
return
|
||||
rotary
|
||||
stretchinf
|
||||
while
|
||||
|
||||
OPENQASM
|
||||
|
||||
CX
|
||||
U
|
||||
|
||||
#pragma
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "barrier"],
|
||||
["keyword", "boxas"],
|
||||
["keyword", "boxto"],
|
||||
["keyword", "break"],
|
||||
["keyword", "const"],
|
||||
["keyword", "continue"],
|
||||
["keyword", "ctrl"],
|
||||
["keyword", "def"],
|
||||
["keyword", "defcal"],
|
||||
["keyword", "defcalgrammar"],
|
||||
["keyword", "delay"],
|
||||
["keyword", "else"],
|
||||
["keyword", "end"],
|
||||
["keyword", "for"],
|
||||
["keyword", "gate"],
|
||||
["keyword", "gphase"],
|
||||
["keyword", "if"],
|
||||
["keyword", "in"],
|
||||
["keyword", "include"],
|
||||
["keyword", "inv"],
|
||||
["keyword", "kernel"],
|
||||
["keyword", "lengthof"],
|
||||
["keyword", "let"],
|
||||
["keyword", "measure"],
|
||||
["keyword", "pow"],
|
||||
["keyword", "reset"],
|
||||
["keyword", "return"],
|
||||
["keyword", "rotary"],
|
||||
["keyword", "stretchinf"],
|
||||
["keyword", "while"],
|
||||
|
||||
["keyword", "OPENQASM"],
|
||||
|
||||
["keyword", "CX"],
|
||||
["keyword", "U"],
|
||||
|
||||
["keyword", "#pragma"]
|
||||
]
|
|
@ -0,0 +1,23 @@
|
|||
1234
|
||||
1e2
|
||||
.5
|
||||
|
||||
1000ms
|
||||
1000dt
|
||||
|
||||
// not a number
|
||||
$0
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["number", "1234"],
|
||||
["number", "1e2"],
|
||||
["number", ".5"],
|
||||
|
||||
["number", "1000ms"],
|
||||
["number", "1000dt"],
|
||||
|
||||
["comment", "// not a number"],
|
||||
"\r\n$0"
|
||||
]
|
|
@ -0,0 +1,56 @@
|
|||
> < >= <= == !=
|
||||
|
||||
& | ~ ^ << >>
|
||||
&= |= ~= ^= <<= >>=
|
||||
|
||||
! && ||
|
||||
|
||||
= -> @
|
||||
|
||||
+ - * / %
|
||||
+= -= *= /= %=
|
||||
++ --
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["operator", ">"],
|
||||
["operator", "<"],
|
||||
["operator", ">="],
|
||||
["operator", "<="],
|
||||
["operator", "=="],
|
||||
["operator", "!="],
|
||||
|
||||
["operator", "&"],
|
||||
["operator", "|"],
|
||||
["operator", "~"],
|
||||
["operator", "^"],
|
||||
["operator", "<<"],
|
||||
["operator", ">>"],
|
||||
|
||||
["operator", "&="],
|
||||
["operator", "|="],
|
||||
["operator", "~="],
|
||||
["operator", "^="],
|
||||
["operator", "<<="],
|
||||
["operator", ">>="],
|
||||
|
||||
["operator", "!"], ["operator", "&&"], ["operator", "||"],
|
||||
|
||||
["operator", "="], ["operator", "->"], ["operator", "@"],
|
||||
|
||||
["operator", "+"],
|
||||
["operator", "-"],
|
||||
["operator", "*"],
|
||||
["operator", "/"],
|
||||
["operator", "%"],
|
||||
|
||||
["operator", "+="],
|
||||
["operator", "-="],
|
||||
["operator", "*="],
|
||||
["operator", "/="],
|
||||
["operator", "%="],
|
||||
|
||||
["operator", "++"],
|
||||
["operator", "--"]
|
||||
]
|
|
@ -0,0 +1,9 @@
|
|||
"foo"
|
||||
'bar'
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["string", "\"foo\""],
|
||||
["string", "'bar'"]
|
||||
]
|
Loading…
Reference in New Issue