From 9f152ca592004e076a47b77ece77624e50bc2746 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 12 Jun 2019 08:00:35 +0200 Subject: [PATCH] make registers const in grammar.jison This commit makes the registers array const for consistency with the other variables in the helpers section. --- CHANGELOG.md | 1 + packages/qiskit-qasm/lib/grammar.jison | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 149086b..bd6db45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `@qiskit/qiskit-sim`: add gates to gates map in constructor - `@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 ## [0.9.0] - 2019-05-13 diff --git a/packages/qiskit-qasm/lib/grammar.jison b/packages/qiskit-qasm/lib/grammar.jison index 78c2b08..65b846e 100644 --- a/packages/qiskit-qasm/lib/grammar.jison +++ b/packages/qiskit-qasm/lib/grammar.jison @@ -71,7 +71,7 @@ // List of register definitionsutil const externalFuncs = ['sin', 'cos', 'tan', 'exp', 'ln', 'sqrt']; - var registers = []; + const registers = []; function launchError(line, msg) { throw new QasmError(msg, {line: line});