Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
60ed0899
Unverified
Commit
60ed0899
authored
Dec 01, 2020
by
Conor Shipp
Committed by
GitHub
Dec 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reserve some Scheme keywords (#2319)
parent
713ff82b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
appinventor/appengine/src/com/google/appinventor/client/OdeMessages.java
...engine/src/com/google/appinventor/client/OdeMessages.java
+2
-2
appinventor/appengine/src/com/google/appinventor/client/youngandroid/TextValidators.java
...oogle/appinventor/client/youngandroid/TextValidators.java
+4
-2
No files found.
appinventor/appengine/src/com/google/appinventor/client/OdeMessages.java
View file @
60ed0899
...
...
@@ -973,11 +973,11 @@ public interface OdeMessages extends Messages, AutogeneratedOdeMessages {
@DefaultMessage
(
"Name cannot be any of the following: CsvUtil, Double, Float, "
+
"Integer, JavaCollection, JavaIterator, KawaEnvironment, Long, Short, SimpleForm, String, "
+
"Pattern, YailList, YailNumberToString, YailRuntimeError, abstract, continue, for, new, "
+
"Pattern, Yail
Dictionary, Yail
List, YailNumberToString, YailRuntimeError, abstract, continue, for, new, "
+
"switch, assert, default, goto, package, synchronized, boolean, do, if, private, this, break, "
+
"double, implements, protected, throw, byte, else, import, public, throws, case, enum, instanceof, "
+
"return, transient, catch, extends, int, short, try, char, final, interface, static, void, class, "
+
"finally, long, strictfp, volatile, const, float, native, super, while"
)
"finally, long, strictfp, volatile, const, float, native, super, while
, begin, def, foreach, forrange, JavaStringUtils, quote
"
)
@Description
(
"Error shown when a new name is a reserved name in Yail or Java code"
)
String
reservedNameError
();
...
...
appinventor/appengine/src/com/google/appinventor/client/youngandroid/TextValidators.java
View file @
60ed0899
...
...
@@ -26,7 +26,7 @@ public final class TextValidators {
protected
static
final
List
<
String
>
YAIL_NAMES
=
Arrays
.
asList
(
"CsvUtil"
,
"Double"
,
"Float"
,
"Integer"
,
"JavaCollection"
,
"JavaIterator"
,
"KawaEnvironment"
,
"Long"
,
"Short"
,
"SimpleForm"
,
"String"
,
"Pattern"
,
"YailList"
,
"YailNumberToString"
,
"YailRuntimeError"
);
"SimpleForm"
,
"String"
,
"Pattern"
,
"Yail
Dictionary"
,
"Yail
List"
,
"YailNumberToString"
,
"YailRuntimeError"
);
protected
static
final
List
<
String
>
JAVA_NAMES
=
Arrays
.
asList
(
"abstract"
,
"continue"
,
"for"
,
"new"
,
"switch"
,
"assert"
,
"default"
,
"goto"
,
"package"
,
"synchronized"
,
"boolean"
,
"do"
,
"if"
,
"private"
,
"this"
,
...
...
@@ -35,6 +35,8 @@ public final class TextValidators {
"final"
,
"interface"
,
"static"
,
"void"
,
"class"
,
"finally"
,
"long"
,
"strictfp"
,
"volatile"
,
"const"
,
"float"
,
"native"
,
"super"
,
"while"
);
protected
static
final
List
<
String
>
SCHEME_NAMES
=
Arrays
.
asList
(
"begin"
,
"def"
,
"foreach"
,
"forrange"
,
"JavaStringUtils"
,
"quote"
);
// This class should never be instantiated.
private
TextValidators
()
{}
...
...
@@ -139,7 +141,7 @@ public final class TextValidators {
* otherwise
*/
public
static
boolean
isReservedName
(
String
text
)
{
return
(
YAIL_NAMES
.
contains
(
text
)
||
JAVA_NAMES
.
contains
(
text
));
return
(
YAIL_NAMES
.
contains
(
text
)
||
JAVA_NAMES
.
contains
(
text
)
||
SCHEME_NAMES
.
contains
(
text
)
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment