Skip to content
This repository has been archived by the owner on Sep 13, 2019. It is now read-only.

Commit

Permalink
fix indentation in grammer.jison
Browse files Browse the repository at this point in the history
This commit makes the indentation of javascript in grammar.jison
consistent.
  • Loading branch information
danbev committed Jun 13, 2019
1 parent ae9b7fc commit fb02465
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `@qiskit/qiskit-sim`: remove unused addGate function in grammar.jison
- `@qiskit/qiskit-sim`: allow custom gates to be overwritten
- `@qiskit/qiskit-qasm`: make registers const in grammar.jison
- `@qiskit/qiskit-qasm`: fix indentation in grammer.jison

## [0.9.0] - 2019-05-13

Expand Down
12 changes: 6 additions & 6 deletions packages/qiskit-qasm/lib/grammar.jison
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
const registers = [];
function launchError(line, msg) {
throw new QasmError(msg, {line: line});
throw new QasmError(msg, {line: line});
}
function addRegister(register, line) {
Expand Down Expand Up @@ -145,11 +145,11 @@
// The first time (to parse the standard library - qelib) we dont pass it.
if (qelib) {
const defined = lodash.find(qelib, { name });
const defined = lodash.find(qelib, { name });
if (!defined) {
launchError(line, `Gate ${name} is not defined`);
}
if (!defined) {
launchError(line, `Gate ${name} is not defined`);
}
}
if (params) { gate.params = params; }
Expand Down Expand Up @@ -368,7 +368,7 @@ Unary
| Id '(' Expression ')'
{
if (!lodash.includes(externalFuncs, $Id)) {
launchError(@Id.first_line, `Illegal external function call: ${$Id}`);
launchError(@Id.first_line, `Illegal external function call: ${$Id}`);
}
$$ = `${$Expression}(${$Id})`;
Expand Down

0 comments on commit fb02465

Please sign in to comment.