From 194bbe845b479217b82fe738740cb5485499e739 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Wed, 3 Jul 2019 15:29:08 +0200 Subject: Allow start of comments by two slashes. Signed-off-by: Pavel Pisa --- qtmips_gui/mainwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qtmips_gui/mainwindow.cpp') diff --git a/qtmips_gui/mainwindow.cpp b/qtmips_gui/mainwindow.cpp index 306099a..46352ea 100644 --- a/qtmips_gui/mainwindow.cpp +++ b/qtmips_gui/mainwindow.cpp @@ -687,6 +687,9 @@ void MainWindow::compile_source() { if (pos >= 0) line.truncate(pos); pos = line.indexOf(";"); + if (pos >= 0) + line.truncate(pos); + pos = line.indexOf("//"); if (pos >= 0) line.truncate(pos); line = line.simplified(); -- cgit v1.2.3