fixed wrong comment formatting in strings

Tue, 21 Apr 2015 09:53:01 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 21 Apr 2015 09:53:01 +0200
changeset 26
05c3c6842aef
parent 25
f82aa7afe872
child 27
53fd8595378c

fixed wrong comment formatting in strings

src/ccodegen.c file | annotate | diff | comparison | revisions
src/javacodegen.c file | annotate | diff | comparison | revisions
--- a/src/ccodegen.c	Tue Apr 21 09:47:52 2015 +0200
+++ b/src/ccodegen.c	Tue Apr 21 09:53:01 2015 +0200
@@ -67,7 +67,7 @@
 
     for (char c = src[sp] ; c ; c=src[++sp]) {
         /* comments */
-        if (c == '/') {
+        if (!isstring && c == '/') {
             if (hltr->iscommentml && sp > 0 && src[sp-1] == '*') {
                 iscomment = 0;
                 hltr->iscommentml = 0;
--- a/src/javacodegen.c	Tue Apr 21 09:47:52 2015 +0200
+++ b/src/javacodegen.c	Tue Apr 21 09:53:01 2015 +0200
@@ -69,7 +69,7 @@
 
     for (char c = src[sp] ; c ; c=src[++sp]) {
         /* comments */
-        if (c == '/') {
+        if (!isstring && c == '/') {
             if (hltr->iscommentml && sp > 0 && src[sp-1] == '*') {
                 iscomment = 0;
                 hltr->iscommentml = 0;

mercurial