소스 검색

feat: 添加无转义字符串

双引号字符串为无转义字符串
SongZihuan 4 년 전
부모
커밋
73425259a5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      VirtulMathCore/parser/syntax.c

+ 1 - 1
VirtulMathCore/parser/syntax.c

@@ -84,7 +84,7 @@ void stringMather(wint_t p, LexMather *mather){
     else if (mather->status == LEXMATHER_ING_1)
         if (mather->string_type == p)
             mather->status = LEXMATHER_ING_4;
-        else if (L'\\' == p)
+        else if (L'\\' == p && mather->string_type == '\'')  // 双引号为无转义字符串
             mather->status = LEXMATHER_ING_5;
         else if (WEOF == p)
             mather->status = LEXMATHER_MISTAKE;