• Dridi Boukelmoune's avatar
    vcc: Fold string parsing into a single function · 5a99d056
    Dridi Boukelmoune authored
    Having now the guarantee that VCL sources are always null-terminated we
    can use standard string.h functions to detect long strings. We can also
    generalize vcc_decstr() to work with all kinds of strings.
    
    Instead of duplicating the code in 3 locations with slight variations,
    encode the specificities of each type of string into a struct and have
    one location to parse them.
    
    Bonus deduplication, inline C parsing is identical.
    
    This is loosely inspired by vcl_fixed_token() and we could further
    reduce the size of the loop in vcc_Lexer() by extracting more logic.
    5a99d056
Name
Last commit
Last update
.circleci Loading commit data...
.github Loading commit data...
bin Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
tools Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
.lgtm.yml Loading commit data...
.syntastic_c_config Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README.Packaging Loading commit data...
README.rst Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
flint.lnt Loading commit data...
varnish-legacy.m4 Loading commit data...
varnish.m4 Loading commit data...
varnishapi-uninstalled.pc.in Loading commit data...
varnishapi.pc.in Loading commit data...
vtc.am Loading commit data...