> Le 19 déc. 2018 à 07:34, Akim Demaille <a...@lrde.epita.fr> a écrit :
> 
> Hi Frank, Hi all,
> 
>> Le 16 déc. 2018 à 10:02, Frank Heckenbach <f.heckenb...@fh-soft.de> a écrit :
>> 
>> So to make it safe, we might need something like this:
>> 
>> static inline
>> symbol_type
>> make_symbol (token_type type, b4_locations_if([const location_type& l, ])T&& 
>> v);
>> 
>> auto-generated for each semantic type T of any token (plus one
>> without the "v" parameter for untyped tokens) that checks (at
>> runtime) the "type" parameter against the (statically known) valid
>> token types for T.
> 
> I like this idea.  I have a draft for it in my repo, as "make-symbol".
> Please, try it and report about it.
> 
> There are a few issues:
> - make_symbol will collide if the user has a token named symbol
>  Any idea of a better name?  

Or simply make them actual constructors for `symbol_type`.

Reply via email to