Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be able to remove delimiters from token stringValue #42

Open
WarTech9 opened this issue Oct 30, 2016 · 1 comment
Open

Should be able to remove delimiters from token stringValue #42

WarTech9 opened this issue Oct 30, 2016 · 1 comment

Comments

@WarTech9
Copy link

Tokens you get back include the delimiters. Generally, if its a comment, you know its delimited by /* */. Similarly, if its a quoted string, you know its delimited by ' or ". I think in the most common use cases, users will expect the tokens returned to be without the delimiters.

Right now the only way to do that is to do some additional parsing on the returned tokens or using substrings or some similar means. I think the best way to do this will be in the state objects (PKQuoteState, PKCommentState) etc. One way would be to have an includeDelimiter property, that when not set, does not include delimiters in the stringValue.

@yepher
Copy link
Contributor

yepher commented Nov 19, 2016

I've not tried it but that seems to be what quotedStringValue is for.

Have a look PKToken::quotedStringValue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants