Skip to content

Commit

Permalink
Remove parser support for constructors to make the errors better.
Browse files Browse the repository at this point in the history
There are still some remnants of constructor support in the ext AST.
  • Loading branch information
arthurp committed Feb 17, 2017
1 parent 79965c5 commit 584b16d
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions OrcScala/src/orc/compile/parse/OrcParsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,7 @@ class OrcParsers(inputContext: OrcInputContext, co: CompilerOptions, envServices

val parseClassConstructor: Parser[ClassConstructor] = (
ident ~ (ListOf(parseTypeVariable)?) -> ClassConstructor.None
| "def" ~> parseDefSigCoreNamed -> ClassConstructor.Def
| "site" ~> parseDefSigCoreNamed -> ClassConstructor.Site)
)

val parseClassDeclaration = (
(parseClassConstructor ~ ("extends" ~> parseClassExpression).? ~ parseClassBody) -> ClassDeclaration)
Expand Down
2 changes: 1 addition & 1 deletion OrcTests/.settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
eclipse.preferences.version=1
encoding//test_data/functional_invalid/classes/constructors1.orc=UTF-8
encoding//test_data/functional_invalid/classes/nonexistent_class.orc=UTF-8
encoding//test_data/functional_valid/block.orc=UTF-8
encoding//test_data/functional_valid/classes/cake_pattern.orc=UTF-8
encoding//test_data/functional_valid/classes/constructors1.orc=UTF-8
encoding//test_data/functional_valid/classes/linearization_conflict.orc=UTF-8
encoding//test_data/functional_valid/classes/recursive_methods.orc=UTF-8
encoding//test_data/functional_valid/classes/shadowing_members.orc=UTF-8
Expand Down

0 comments on commit 584b16d

Please sign in to comment.