Skip to content

Reason for undefined location properties #1717

Answered by bd82
medihack asked this question in Q&A
Discussion options

You must be logged in to vote

I wonder a bit in what scenario the startColumn, endOffset, endLine and endColumn of CstNodeLocation can be undefined

The whole token location information is not always available, so the whole CstNodeLocation information
may not always be available. I am not sure how to model this better in the type definitions.

second thing I noticed is that in an IToken additionally startLine can be undefined (but not in CstNodeLocation). Is there a reason for that?

This seems like a mistake in the type signatures

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@medihack
Comment options

@bd82
Comment options

@medihack
Comment options

@bd82
Comment options

Answer selected by medihack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants