Skip to content
Permalink
Browse files

[FEATURE] Add comment functionality to QgsExpression

  • Loading branch information
m-kuhn committed Nov 30, 2014
1 parent e48a6f6 commit 0a7facbe2e49dc4d14d2f456bf2ab1f3bb1a8afe
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/core/qgsexpressionlexer.ll
@@ -95,6 +95,8 @@ static QLocale cLocale("C");

%}

%s IN_COMMENT

white [ \t\r\n]+

non_ascii [\x80-\xFF]
@@ -117,6 +119,16 @@ string "'"{str_char}*"'"
%%
<INITIAL>{
"/*" BEGIN(IN_COMMENT);
}
<IN_COMMENT>{
"*/" BEGIN(INITIAL);
[^*\n]+ // eat comment in chunks
"*" // eat the lone star
\n yylineno++;
}
"NOT" { U_OP(uoNot); return NOT; }
"AND" { B_OP(boAnd); return AND; }
"OR" { B_OP(boOr); return OR; }
@@ -185,4 +197,5 @@ string "'"{str_char}*"'"
. { return Unknown_CHARACTER; }
%%

0 comments on commit 0a7facb

Please sign in to comment.
You can’t perform that action at this time.