* Add OpenQASM support

* Add grammar

* Update submodules
This commit is contained in:
Neel Kamath 2020-03-10 15:40:53 +05:30 коммит произвёл GitHub
Родитель 2a81510cc8
Коммит 85d85a9ec5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 56 добавлений и 0 удалений

3
.gitmodules поставляемый
Просмотреть файл

@ -599,6 +599,9 @@
[submodule "vendor/grammars/language-property-list"]
path = vendor/grammars/language-property-list
url = https://github.com/atom/language-property-list
[submodule "vendor/grammars/language-qasm"]
path = vendor/grammars/language-qasm
url = https://github.com/tareqdandachi/language-qasm
[submodule "vendor/grammars/language-reason"]
path = vendor/grammars/language-reason
url = https://github.com/reasonml-editor/language-reason

Просмотреть файл

@ -536,6 +536,8 @@ vendor/grammars/language-povray:
vendor/grammars/language-property-list:
- source.plist
- text.xml.plist
vendor/grammars/language-qasm:
- source.qasm
vendor/grammars/language-reason:
- source.reason
- source.reason.hover.type

Просмотреть файл

@ -3644,6 +3644,14 @@ OpenEdge ABL:
tm_scope: source.abl
ace_mode: text
language_id: 264
OpenQASM:
type: programming
extensions:
- ".qasm"
color: "#AA70FF"
tm_scope: source.qasm
ace_mode: text
language_id: 153739399
OpenRC runscript:
type: programming
group: Shell

Просмотреть файл

@ -0,0 +1,15 @@
// A half adder circuit.
OPENQASM 2.0;
include "qelib1.inc";
qreg q[4];
creg c[2];
x q[0]; // Remove to keep the first input as 0.
x q[1]; // Remove to keep the first input as 0.
cx q[0], q[2];
cx q[1], q[2];
ccx q[0], q[1], q[3];
measure q[2] -> c[0];
measure q[3] -> c[1];

1
vendor/README.md поставляемый
Просмотреть файл

@ -291,6 +291,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **Open Policy Agent:** [tsandall/vscode-opa](https://github.com/tsandall/vscode-opa)
- **OpenCL:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle)
- **OpenEdge ABL:** [jfairbank/Sublime-Text-2-OpenEdge-ABL](https://github.com/jfairbank/Sublime-Text-2-OpenEdge-ABL)
- **OpenQASM:** [tareqdandachi/language-qasm](https://github.com/tareqdandachi/language-qasm)
- **OpenRC runscript:** [atom/language-shellscript](https://github.com/atom/language-shellscript)
- **OpenSCAD:** [tbuser/openscad.tmbundle](https://github.com/tbuser/openscad.tmbundle)
- **OpenStep Property List:** [atom/language-property-list](https://github.com/atom/language-property-list)

1
vendor/grammars/language-qasm поставляемый Submodule

@ -0,0 +1 @@
Subproject commit 8d5bbadaee337adf94e1b0084b80aa277acdd18a

26
vendor/licenses/grammar/language-qasm.txt поставляемый Normal file
Просмотреть файл

@ -0,0 +1,26 @@
---
type: grammar
name: language-qasm
version: 8d5bbadaee337adf94e1b0084b80aa277acdd18a
license: mit
---
Copyright (c) 2019 Tareq El Dandachi
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.