[
https://issues.apache.org/jira/browse/THRIFT-434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697128#action_12697128
]
Michael Stockton commented on THRIFT-434:
-----------------------------------------
I think you're right, David. Jira's markup italicized a couple items in my
list. I looked at PHP's manual to see if there are additional keywords missing
beside "{code}__DIR__{code}". Below is a list of PHP keywords I found at
"http://us.php.net/manual/en/reserved.keywords.php"; keywords prefixed with an
asterisk are missing from thrift's lexer. If you approve, I'll add them.
{code}
* __CLASS__
* __DIR__
__FILE__
* __FUNCTION__
* __METHOD__
* __NAMESPACE__
abstract
and
as
break
case
* catch
class
* clone
const
continue
declare
default
do
else
elseif
* enddeclare
* endfor
* endforeach
* endif
* endswitch
* endwhile
extends
final
for
foreach
function
global
goto
if
implements
interface
* instanceof
namespace
new
or
private
protected
public
static
switch
throw
try
* use
var
while
* xor
{code}
> 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 (General), Compiler (Ruby)
> Reporter: Michael Stockton
> Assignee: Michael Stockton
> Priority: Minor
> Fix For: 0.2
>
> Attachments: thrift-434.patch
>
>
> 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.