[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdev-ruby] parser: Fixed the detection of shortcuts with weird delimiters
From: Miquel_Sabaté <mikisabate () gmail ! com>
Date: 2013-02-28 21:11:40
Message-ID: 20130228211140.146B8A604F () git ! kde ! org
[Download RAW message or body]
Git commit 19d4b0f65881b4046992d9f7ffcbaf3d106f2038 by Miquel Sabaté.
Committed on 28/02/2013 at 18:58.
Pushed by mssola into branch 'master'.
Fixed the detection of shortcuts with weird delimiters
M +1 -2 parser/parser.y
http://commits.kde.org/kdev-ruby/19d4b0f65881b4046992d9f7ffcbaf3d106f2038
diff --git a/parser/parser.y b/parser/parser.y
index dd0486a..be2009c 100644
--- a/parser/parser.y
+++ b/parser/parser.y
@@ -1783,9 +1783,8 @@ none : /* none */ { $$ = NULL; }
&& *(c+4) == 'i' && *(c+5) == 'n')
#define multiline_end(c) (*c == '=' && *(c+1) == 'e' && *(c+2) == 'n' \
&& *(c+3) == 'd')
-#define is_simple(c) (c == '(' || c == '{' || c == '[' || c == '|' || c == '<' || c == '/' || c == '$')
#define is_shortcut(c) (to_upper(c) == 'W' || c == 'r' || to_upper(c) == 'Q' \
- || c == 'x' || to_upper(c) == 'I' || is_simple(c))
+ || c == 'x' || to_upper(c) == 'I' || (ispunct(c) && !parser->symbeg))
/* TODO: dollar and at are already checked by is_valid_identifier */
#define not_sep(c) (is_valid_identifier(c) || is_utf8_digit(c) \
|| *c == '_' || *c == '$' || *c == '@')
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic