Wiki

Ticket #107 (accepted enhancement)

Opened 9 years ago

Last modified 9 years ago

Syntactic relaxation: Type declaration clauses

Reported by: Chuck Owned by: Chuck
Priority: major Milestone: Cobra 0.9
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Change History

Changed 9 years ago by Chuck

  • owner set to Chuck
  • status changed from new to accepted

This allows "is", "has" and "inherits":

  • in any order
  • on the same line or separate lines
  • but not more than once

Note that you can do line continuations with _ if you'd like to put multiple parts of a given clause on separate lines, such as multiple attributes.

Changed 9 years ago by Chuck

This has been expanded to: is, has, inherits, implements, where

This is done for classes in changeset:1944

See source:cobra/trunk/Tests/120-classes/920-type-decl-clauses.cobra

Outstanding work:

  • interfaces
  • structs
  • add a test case for error when type decl clauses are specified more than once
  • more tests with generic constraints?

Changed 9 years ago by Chuck

This is done for interfaces in changeset:1945

Changed 9 years ago by Chuck

Done in changeset:1946

Changed 9 years ago by Chuck

I meant done for structs in changeset:1946.

Outstanding:

  • more tests with generic constraints
Note: See TracTickets for help on using tickets.