UCL_PARSER_NO_TIME = (1 << 2), /**< Do not parse time and treat time values as strings */
UCL_PARSER_NO_IMPLICIT_ARRAYS = (1 << 3), /** Create explicit arrays instead of implicit ones */
UCL_PARSER_SAVE_COMMENTS = (1 << 4), /** Save comments in the parser context */
- UCL_PARSER_DISABLE_MACRO = (1 << 5) /** Treat macros as comments */
+ UCL_PARSER_DISABLE_MACRO = (1 << 5), /** Treat macros as comments */
+ UCL_PARSER_NO_FILEVARS = (1 << 6) /** Do not set file vars */
} ucl_parser_flags_t;
/**
parser->comments = ucl_object_typed_new (UCL_OBJECT);
}
- /* Initial assumption about filevars */
- ucl_parser_set_filevars (parser, NULL, false);
+ if (!(flags & UCL_PARSER_NO_FILEVARS)) {
+ /* Initial assumption about filevars */
+ ucl_parser_set_filevars (parser, NULL, false);
+ }
return parser;
}