Ticket #108 (closed enhancement: fixed)

Opened 12 years ago

Last modified 8 years ago

Modifier sections in type declarations

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


Cobra already has this, but with shared only. Extend this to any modifier keywords and allow multiple ones separated by commas.

class X
    private, shared
        def foo
    def bar is shared
class Y
    inherits X
    def main is shared
        .foo  # .error.

Implementation: This has been partially coded for in CobraParser? in _isNamesStack (which should probably be renamed _modifierNamesStack).


modifier-sections.patch Download (14.3 KB) - added by hopscc 8 years ago.

Change History

Changed 8 years ago by hopscc

Changed 8 years ago by hopscc

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

Patch to support all the modifiers/isNames and multiple modifiers in modifier block. Use same code as that for inline isname modifierDecls

Partially rationalise method naming for this in CobraParser - isNames, DeclNames, DeclModifers, Modifiers
DeclNames for high level Modifier/modifierNames for implementation, isNames for lists of names.
Some additional refactoring.

Add missing checks noted as TOdos after validIsName checking.

new Test dir in 120-classes for isNames - blocks and errors...

Changed 8 years ago by Charles

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.