summaryrefslogtreecommitdiff
path: root/switch.c
diff options
context:
space:
mode:
authorSøren Sandmann <sandmann@redhat.com>2008-07-06 12:25:04 -0400
committerSøren Sandmann <sandmann@redhat.com>2008-07-06 12:25:04 -0400
commit74fde823ca7024ee32ba121e1fbf6115b51c194e (patch)
tree131cb6c5a2e6e757a7f59edde9cf33723caed038 /switch.c
parent6fb8e5617d65208a9c9fd6b101b5f6c23a664ad7 (diff)
Support for strings
Diffstat (limited to 'switch.c')
-rw-r--r--switch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/switch.c b/switch.c
index b6d0740..050936f 100644
--- a/switch.c
+++ b/switch.c
@@ -40,6 +40,10 @@ constant_expression (ast_expression_t *expr,
case AST_BOOL_LITERAL_EXPRESSION:
value->bool_val = expr->bool_literal.value;
break;
+
+ case AST_STRING_LITERAL_EXPRESSION:
+ value->pointer_val = expr->string_literal.value;
+ break;
case AST_NULL_EXPRESSION:
value->pointer_val = NULL;