Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

📎 Utilities to access the value of literals #2053

Closed
leops opened this issue Feb 4, 2022 · 3 comments
Closed

📎 Utilities to access the value of literals #2053

leops opened this issue Feb 4, 2022 · 3 comments
Labels
A-Formatter Area: formatter task A task, an action that needs to be performed

Comments

@leops
Copy link
Contributor

leops commented Feb 4, 2022

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 leops added the task A task, an action that needs to be performed label Feb 4, 2022
@ematipico ematipico added the A-Formatter Area: formatter label Feb 4, 2022
@ematipico
Copy link
Contributor

Should we track this in #1996 ?

@leops
Copy link
Contributor Author

leops commented Feb 4, 2022

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.

@yassere yassere added this to Rome 2022 May 8, 2022
@Conaclos
Copy link
Contributor

This could be of use for #4108

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Formatter Area: formatter task A task, an action that needs to be performed
Projects
Status: Done
Development

No branches or pull requests

3 participants