|
@@ -29,7 +29,9 @@ static hl_node * hl_token_find_prev(hl_node *node) {
|
|
|
}
|
|
|
|
|
|
static void hl_token_check_function(hl_node *node) {
|
|
|
- if (hl_token_find_prev(node)->type == HL_NODE_TYPE)
|
|
|
+ hl_node *prev = hl_token_find_prev(node);
|
|
|
+
|
|
|
+ if (prev && node->type == HL_NODE_TYPE)
|
|
|
node->type = HL_NODE_FUNCTION;
|
|
|
else if (node->type == 0)
|
|
|
node->type = HL_NODE_FUNCTION_CALL;
|
|
@@ -116,6 +118,8 @@ void hl_next_word(char *word, int len, hl_node *node, hl_ctx *ctx) {
|
|
|
node->text = strdup(word);
|
|
|
node->text_len = len;
|
|
|
|
|
|
+ puts(word);
|
|
|
+
|
|
|
if (len == 1) {
|
|
|
hl_token_single(word[0], node, ctx);
|
|
|
return;
|