summaryrefslogtreecommitdiff
path: root/src/xkbcomp/ast.h
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2013-11-27 13:49:13 +0200
committerRan Benita <ran234@gmail.com>2013-11-27 13:52:54 +0200
commit9dc5b8cb6097c5bfd61dbe6a17b59aa8fe9638e5 (patch)
treea5944d0ed8308e52dc89b0831efa3dc5b0f0f4d1 /src/xkbcomp/ast.h
parentba7530fa90795e077e685346444ebe3a3c1595ee (diff)
downloadxorg-lib-libxkbcommon-9dc5b8cb6097c5bfd61dbe6a17b59aa8fe9638e5.tar.gz
Resolve keysyms early in parser
Instead of having the parser passing strings to the AST, and symbols/compat etc. resolving them themselves. This simplifies the code a bit, and makes it possible to print where exactly in the file the bad keysym originates from. The previous lazy approach had an advantage of not needlessly resolving keysyms from unrelated maps. However, I think reporting these errors in *any* map is better, and the parser is also a bit smarter then old xkbcomp and doesn't parse many useless maps. So there's no discernible speed/memory difference with this change. Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/xkbcomp/ast.h')
-rw-r--r--src/xkbcomp/ast.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xkbcomp/ast.h b/src/xkbcomp/ast.h
index c430a77..ed8831b 100644
--- a/src/xkbcomp/ast.h
+++ b/src/xkbcomp/ast.h
@@ -181,7 +181,7 @@ typedef struct _Expr {
struct _Expr *args;
} action;
struct {
- darray(char *) syms;
+ darray(xkb_keysym_t) syms;
darray(int) symsMapIndex;
darray(unsigned int) symsNumEntries;
} list;
@@ -252,7 +252,7 @@ typedef struct {
typedef struct {
ParseCommon common;
enum merge_mode merge;
- char *sym;
+ xkb_keysym_t sym;
ExprDef *match;
VarDef *def;
} InterpDef;