tools icon indicating copy to clipboard operation
tools copied to clipboard

📎 Utilities to access the value of literals

Open leops opened this issue 3 years ago • 2 comments

Description

Currently the syntax tree only allows access to the textual value of nodes and tokens. For a variety of formatting and analysis purpose it might be useful to access the string value of a string literal (with the escape sequences interpreted) or mathematical value of a numeric literal.

leops avatar Feb 04 '22 15:02 leops

Should we track this in #1996 ?

ematipico avatar Feb 04 '22 15:02 ematipico

It's not directly related to the formatter, at least until we decide to rewrite literals. This is more of a general purpose, nice-to-have utility but is obviously very low priority until we have an actual use case for it.

leops avatar Feb 04 '22 16:02 leops