You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "David Reiss (JIRA)" <ji...@apache.org> on 2009/04/07 23:16:12 UTC

[jira] Commented: (THRIFT-434) ruby compiler should warn when a reserved word is used

    [ https://issues.apache.org/jira/browse/THRIFT-434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696761#action_12696761 ] 

David Reiss commented on THRIFT-434:
------------------------------------

Some of these are already done.  Feel free to add the rest to thriftl.ll (though "defined?" is not a valid Thrift identifier).  Unfortunately, we had to remove "final" from this list because we wanted it to be used as an annotation name.  Eventually, we should probably move this check out of the lexer so that we can continue to check for that one.

> ruby compiler should warn when a reserved word is used
> ------------------------------------------------------
>
>                 Key: THRIFT-434
>                 URL: https://issues.apache.org/jira/browse/THRIFT-434
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Michael Stockton
>            Priority: Minor
>             Fix For: 0.2
>
>
> It would be nice if the compiler would warn or fail when a reserved word is used as a struct name, service name or field name. The following names should be avoided:
> __FILE__ 
> and
> def
> end
> in
> or
> self
> unless 
> __LINE__
> begin
> defined?
> ensure
> module
> redo
> super
> until 
> BEGIN
> break
> do
> false
> next
> rescue
> then
> when 
> END
> case
> else
> for
> nil
> retry
> true
> while 
> alias
> class
> elsif
> if
> not
> return
> undef
> yield 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.