From ee8e14c2e6538bf47175ccd78647fc038a4bc60f Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 3 Oct 2020 17:12:32 +0100 Subject: parse: Add calc() parser. Co-authored-by: Michael Drake --- src/parse/properties/css_property_parser_gen.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/parse/properties/css_property_parser_gen.c') diff --git a/src/parse/properties/css_property_parser_gen.c b/src/parse/properties/css_property_parser_gen.c index 1e8b007..100fba1 100644 --- a/src/parse/properties/css_property_parser_gen.c +++ b/src/parse/properties/css_property_parser_gen.c @@ -316,6 +316,16 @@ void output_length_unit(FILE *outputf, struct keyval *parseid, struct keyval_lis struct keyval *ckv = kvlist->item[0]; int ident_count; + fprintf(outputf, + "if ((token->type == CSS_TOKEN_IDENT) && " + "(lwc_string_caseless_isequal(token->idata, c->strings[CALC], &match) == lwc_error_ok && match))" + " {\n" + "\t\terror = css__parse_calc(c, vector, ctx, result, buildOPV(%s, 0, %s /* _CALC */), %s);\n" + "\t} else ", + parseid->val, + ckv->val, + ckv->key + ); fprintf(outputf, "{\n" -- cgit v1.2.3