diff options
author | Martin Odersky <odersky@gmail.com> | 2003-07-04 14:06:34 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-07-04 14:06:34 +0000 |
commit | 00abd39f96ee40da727ccc735d25ca3d96ce01ce (patch) | |
tree | 6d7314cd14761335c0dd99d149d8934ef45d4115 /sources/scalac/ast/parser/Parser.java | |
parent | bf8fd4c5b3e1df5b249f7fa2d765913cf662fd51 (diff) | |
download | scala-00abd39f96ee40da727ccc735d25ca3d96ce01ce.tar.gz scala-00abd39f96ee40da727ccc735d25ca3d96ce01ce.tar.bz2 scala-00abd39f96ee40da727ccc735d25ca3d96ce01ce.zip |
*** empty log message ***
Diffstat (limited to 'sources/scalac/ast/parser/Parser.java')
-rw-r--r-- | sources/scalac/ast/parser/Parser.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sources/scalac/ast/parser/Parser.java b/sources/scalac/ast/parser/Parser.java index 0ec6de68b0..51d926afdf 100644 --- a/sources/scalac/ast/parser/Parser.java +++ b/sources/scalac/ast/parser/Parser.java @@ -115,15 +115,16 @@ public class Parser implements Tokens { boolean isModifier() { return (s.token == ABSTRACT) || (s.token == FINAL) + || (s.token == SEALED) || (s.token == PRIVATE) || (s.token == PROTECTED) -// || (s.token == QUALIFIED) || (s.token == OVERRIDE); } boolean isLocalModifier() { return (s.token == ABSTRACT) - || (s.token == FINAL); + || (s.token == FINAL) + || (s.token == SEALED); } boolean isDefIntro() { @@ -921,6 +922,9 @@ public class Parser implements Tokens { convertToConstr(stats[stats.length - 1])); else syntaxError(res.pos, "class constructor expected", false); + break; + default: + res = applyConstr(convertToConstr(res)); } accept(RBRACE); return res; @@ -1190,6 +1194,9 @@ public class Parser implements Tokens { case FINAL: mod = Modifiers.FINAL; break; + case SEALED: + mod = Modifiers.SEALED; + break; case PRIVATE: mod = Modifiers.PRIVATE; break; @@ -1224,6 +1231,9 @@ public class Parser implements Tokens { case FINAL: mod = Modifiers.FINAL; break; + case SEALED: + mod = Modifiers.SEALED; + break; default: return mods; } @@ -1386,9 +1396,11 @@ public class Parser implements Tokens { t = make.Select(pos, t, name); pos = accept(DOT); } else { + /* if (name == Names.ASTERISK) s.unit.warning( pos, "this imports only the identifier `*';\nuse `import xyz._' to import all members of `xyz'."); + */ return make.Import(startpos, t, new Name[]{name, name}); } } |