Closed taku0 closed 11 years ago
Reserved words can be used as identifiers if backquoted. This patch quotes reserved words instead of just eliminating them.
Reserved words are taken from the section 1.1 of the language specification.
Here is a sample layout file:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"> <TextView android:id="@+id/lazy"/> <TextView android:id="@+id/object"/> <TextView android:id="@+id/override"/> <TextView android:id="@+id/sealed"/> <TextView android:id="@+id/trait"/> <TextView android:id="@+id/var"/> <TextView android:id="@+id/forSome"/> <TextView android:id="@+id/match"/> <TextView android:id="@+id/type"/> <TextView android:id="@+id/with"/> <TextView android:id="@+id/yield"/> <TextView android:id="@+id/def"/> <TextView android:id="@+id/implicit"/> <TextView android:id="@+id/val"/> </LinearLayout>
Note that we cannot use Java reserved words anyway.
@taku0, I noticed there is some duplication with TypedLayouts.scala. Do you mind refactoring this and submitting another PR?
Reserved words can be used as identifiers if backquoted. This patch quotes reserved words instead of just eliminating them.
Reserved words are taken from the section 1.1 of the language specification.
Here is a sample layout file:
Note that we cannot use Java reserved words anyway.