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
The explain command's output is normally usable a command in its own right (and vice-versa), but this falls on its feet when the variable name is called ptr:
c++decl> explain void *ptr
declare ptr as pointer to void
c++decl> declare ptr as pointer to void
^
18: syntax error: "ptr": name or operator expected
The text was updated successfully, but these errors were encountered:
That's because ptr is a cdecl keyword that's a shorthand for pointer. Note that cdecl recognizes such words only when parsing English and not gibberish (which is why your explain line works).
I could perhaps add code to check to see if a token is a cdecl keyword and include that in the error message. Cdecl already does that for C/C++ keywords, e.g.:
cdecl> declare switch as pointer to void
^
18: syntax error: "switch": name or operator expected ("switch" is a keyword)
The explain command's output is normally usable a command in its own right (and vice-versa), but this falls on its feet when the variable name is called ptr:
The text was updated successfully, but these errors were encountered: