Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1122)

Unified Diff: compiler/java/com/google/dart/compiler/ast/Modifiers.java

Issue 10837286: Support new optional parameter syntax (issue 4289) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/parser/DartParser.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/ast/Modifiers.java
===================================================================
--- compiler/java/com/google/dart/compiler/ast/Modifiers.java (revision 10825)
+++ compiler/java/com/google/dart/compiler/ast/Modifiers.java (working copy)
@@ -26,7 +26,8 @@
private static final int FLAG_ABSTRACTFIELD = FLAG_INLINABLE << 1;
private static final int FLAG_REDIRECTEDCONSTRUCTOR = FLAG_ABSTRACTFIELD << 1;
private static final int FLAG_FINAL = FLAG_REDIRECTEDCONSTRUCTOR << 1;
- private static final int FLAG_NAMED = FLAG_FINAL << 1;
+ private static final int FLAG_OPTIONAL = FLAG_FINAL << 1;
+ private static final int FLAG_NAMED = FLAG_OPTIONAL << 1;
private static final int FLAG_INITIALIZED = FLAG_NAMED << 1;
private static final int FLAG_EXTERNAL = FLAG_INITIALIZED << 1;
@@ -44,6 +45,7 @@
public boolean isAbstractField() { return is(FLAG_ABSTRACTFIELD); }
public boolean isRedirectedConstructor() { return is(FLAG_REDIRECTEDCONSTRUCTOR); }
public boolean isFinal() { return is(FLAG_FINAL); }
+ public boolean isOptional() { return is(FLAG_OPTIONAL); }
public boolean isNamed() { return is(FLAG_NAMED); }
public boolean isInitialized() { return is(FLAG_INITIALIZED); }
public boolean isExternal() { return is(FLAG_EXTERNAL); }
@@ -60,6 +62,7 @@
public Modifiers makeAbstractField() { return make(FLAG_ABSTRACTFIELD); }
public Modifiers makeRedirectedConstructor() { return make(FLAG_REDIRECTEDCONSTRUCTOR); }
public Modifiers makeFinal() { return make(FLAG_FINAL); }
+ public Modifiers makeOptional() { return make(FLAG_OPTIONAL); }
public Modifiers makeNamed() { return make(FLAG_NAMED); }
public Modifiers makeInitialized() { return make(FLAG_INITIALIZED); }
public Modifiers makeExternal() { return make(FLAG_EXTERNAL); }
@@ -76,6 +79,7 @@
public Modifiers removeAbstractField() { return remove(FLAG_ABSTRACTFIELD); }
public Modifiers removeRedirectedConstructor() { return remove(FLAG_REDIRECTEDCONSTRUCTOR); }
public Modifiers removeFinal() { return remove(FLAG_FINAL); }
+ public Modifiers removeOptional() { return remove(FLAG_OPTIONAL); }
public Modifiers removeNamed() { return remove(FLAG_NAMED); }
public Modifiers removeIniitalized() { return remove(FLAG_INITIALIZED); }
public Modifiers removeExternal() { return remove(FLAG_EXTERNAL); }
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/parser/DartParser.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698