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

Added missing statements and expressions to createVisitor #567

Merged

Conversation

arturocuya
Copy link
Contributor

Statements added:

  • DimStatement
  • InterfaceStatement
  • InterfaceFieldStatement
  • InterfaceMethodStatement
  • TryCatchStatement
  • CatchStatement
  • ThrowStatement

Expressions added:

  • FunctionParameterExpression
  • AAMemberExpression
  • AnnotationExpression
  • TernaryExpression
  • NullCoalescingExpression
  • RegexLiteralExpression

@arturocuya
Copy link
Contributor Author

@TwitchBronBron It would be nice to have @example comment docs showing the code that some statements represent (for newbies like me). For example, the following were not obvious to me:

  • EscapedCharCodeLiteralExpression
  • TemplateStringQuasiExpression
  • LabelStatement
  • DimStatement
  • InterfaceStatement

@@ -55,7 +55,7 @@ export function walk<T>(keyParent: T, key: keyof T, visitor: WalkVisitor, option
}

if (!element.walk) {
throw new Error(`${keyParent.constructor.name}["${key}"]${parent ? ` for ${parent.constructor.name}` : ''} does not contain a "walk" method`);
throw new Error(`${keyParent.constructor.name}["${String(key)}"]${parent ? ` for ${parent.constructor.name}` : ''} does not contain a "walk" method`);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting this error:
Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.ts(2731)

@TwitchBronBron TwitchBronBron merged commit 06ad68a into rokucommunity:master Apr 12, 2022
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

Successfully merging this pull request may close these issues.

2 participants