Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,11 @@ public String toVarName(String name) {
name = "_u";
}

// numbers are not allowed at the beginning
if (name.matches("^\\d.*")) {
Copy link
Member

Choose a reason for hiding this comment

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

I guess this is needed here, in addition to


if the name is all uppercase and thus matches this early return:

name = "_" + name;
}

// if it's all uppper case, do nothing
if (name.matches("^[A-Z0-9_]*$")) {
return name;
Expand Down