You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plugins can use this.warn and this.error to emit warnings/errors. These functions accept a second pos argument, which must be an integer. This integer is the character index within the code.
My plugin uses recast to parse the source code, which gives me back an AST. This AST contains loc objects, like { line: 0, column: 10 }, but it does not contain the character index.
Therefore, I cannot use the second argument to this.warn or this.error, but I would like to. So I would prefer if I could pass in a { line, column } object instead of a character index.
The text was updated successfully, but these errors were encountered:
Plugins can use
this.warn
andthis.error
to emit warnings/errors. These functions accept a secondpos
argument, which must be an integer. This integer is the character index within the code.My plugin uses
recast
to parse the source code, which gives me back an AST. This AST containsloc
objects, like{ line: 0, column: 10 }
, but it does not contain the character index.Therefore, I cannot use the second argument to
this.warn
orthis.error
, but I would like to. So I would prefer if I could pass in a{ line, column }
object instead of a character index.The text was updated successfully, but these errors were encountered: