-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add docs to string methods in SymbolLiteral
and MacroId
#9298
Add docs to string methods in SymbolLiteral
and MacroId
#9298
Conversation
…oId` Because their methods delegates to `StringLiteral`. In fact, `SymbolLiteral#underscore` and `MacroId#underscore` are missing in document. It should be shared.
7e1e7b3
to
6ae7ca0
Compare
Follow #9269 changes. |
ping |
Any reasons against using a generic module instead of a macro? |
Because they don't include any |
I don't quite understand, I mean having something like |
It won't make sense. Such hierarchy doesn't exist in the compiler. The type doesn't exist in macros. |
Repeat from the above PR description, current documentation misses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like to get it in the next version
src/compiler/crystal/macros.cr
Outdated
# Similar to `String#>` | ||
def >(other : StringLiteral | MacroId) : BoolLiteral | ||
end | ||
|
||
# Similar to `String#<` | ||
def <(other : StringLiteral | MacroId) : BoolLiteral | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SymbolLiteral
doesn't have <
>
methods.
The rest seems to be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for my slow response. This is fixed.
StringLiteral
methods document with SymbolLiteral
and MacroId
SymbolLiteral
and MacroId
Because their methods delegates to
StringLiteral
. In fact,SymbolLiteral#underscore
andMacroId#underscore
are missing in document. It should be shared.In details, it uses a file
private
macro nameddef_string_methods
.Thank you.