From 291b6f06070a5570992a03c3c6332297e69f98bb Mon Sep 17 00:00:00 2001 From: belliash Date: Thu, 18 Apr 2019 06:48:51 +0200 Subject: [PATCH] Get rid of backstick quoted strings (shell commands). --- engine/lexer.c | 19 ------------------- include/ph7int.h | 1 - 2 files changed, 20 deletions(-) diff --git a/engine/lexer.c b/engine/lexer.c index ec25189..3232a14 100644 --- a/engine/lexer.c +++ b/engine/lexer.c @@ -347,25 +347,6 @@ static sxi32 TokenizeAerScript(SyStream *pStream, SyToken *pToken, void *pUserDa pStream->zText++; return SXRET_OK; } - case '`': { - /* Backtick quoted string */ - pStr->zString++; - while(pStream->zText < pStream->zEnd) { - if(pStream->zText[0] == '`' && pStream->zText[-1] != '\\') { - break; - } - if(pStream->zText[0] == '\n') { - pStream->nLine++; - } - pStream->zText++; - } - /* Record token length and type */ - pStr->nByte = (sxu32)((const char *)pStream->zText - pStr->zString); - pToken->nType = PH7_TK_BSTR; - /* Jump the trailing backtick */ - pStream->zText++; - return SXRET_OK; - } case '\\': pToken->nType = PH7_TK_NSSEP; break; diff --git a/include/ph7int.h b/include/ph7int.h index d263f69..ba8a724 100644 --- a/include/ph7int.h +++ b/include/ph7int.h @@ -1545,7 +1545,6 @@ enum ph7_expr_id { #define PH7_TK_SSTR 0x0004000 /* Single quoted string 'str' */ #define PH7_TK_COMMA 0x0020000 /* Comma ',' */ #define PH7_TK_SEMI 0x0040000 /* Semi-colon ";" */ -#define PH7_TK_BSTR 0x0080000 /* Backtick quoted string [i.e: Shell command `date`] */ #define PH7_TK_COLON 0x0100000 /* single Colon ':' */ #define PH7_TK_AMPER 0x0200000 /* Ampersand '&' */ #define PH7_TK_EQUAL 0x0400000 /* Equal '=' */