aboutsummaryrefslogtreecommitdiff
path: root/src/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer.c')
-rw-r--r--src/lexer.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lexer.c b/src/lexer.c
index 2a80ddb..28dee8a 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -77,6 +77,18 @@ found_start:
}
directive->operands = operand;
+ } else if (strncmp(buffer + n, "content ", strlen("content")) == 0) {
+ directive->type = CONTENT;
+
+ char *operand = NULL;
+ for (size_t i = n + strlen("content"); i < match->length - n; i++)
+ if (isalnum(buffer[i])) {
+ sscanf(buffer + i, "%ms\"", &operand);
+ operand[strlen(operand) - 1] = '\0';
+ break;
+ }
+
+ directive->operands = operand;
} else if (strncmp(buffer + n, "endcontent", strlen("endcontent")) == 0) {
directive->type = ENDCONTENT;
directive->operands = NULL;