From 45e044ed86e14da2734700afd842fcb0a29623c4 Mon Sep 17 00:00:00 2001
From: a
Date: Sat, 7 Dec 2024 19:30:19 -0500
Subject: [PATCH] Sat 07 Dec 2024 07:30:19 PM EST
---
src/imports/istina-editor.js | 5 +++--
src/index.html | 23 +++++++++++++++++++++--
src/openqasm.c | 19 ++++++++++++++-----
src/openqasm.h | 4 ++--
4 files changed, 40 insertions(+), 11 deletions(-)
diff --git a/src/imports/istina-editor.js b/src/imports/istina-editor.js
index 6159c69..b1f8d67 100644
--- a/src/imports/istina-editor.js
+++ b/src/imports/istina-editor.js
@@ -247,13 +247,14 @@ IstinaEditor.highlightForQAnsel = function(txt)
"barrier",
"hvar",
"noise",
+ "shots",
"rand",
"born"
];
for (var i = 0; i < keywords.length; i++)
{
- if (keywords[i] == "hvar" || keywords[i] == "noise") continue;
+ if (keywords[i] == "hvar" || keywords[i] == "noise" || keywords[i] == "shots") continue;
var tmp = new RegExp("(^|[ ]|[;]|[>])" + keywords[i] + "($|[ ]|[<]|[&])", "g");
txt = txt.replaceAll(tmp, x =>
{
@@ -290,7 +291,7 @@ IstinaEditor.highlightForQAnsel = function(txt)
);
txt = txt.replaceAll
(
- /(noise|hvar)( | )[.\-0-9][.\-0-9]*/g,
+ /(noise|hvar|shots)( | )[.\-0-9][.\-0-9]*/g,
x =>
{
x = x.replace(" ", " ");
diff --git a/src/index.html b/src/index.html
index 3e45528..075d0b9 100644
--- a/src/index.html
+++ b/src/index.html
@@ -112,6 +112,7 @@