Wiki

Ticket #108 (closed enhancement: fixed)

Opened 15 years ago

Last modified 11 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:

Description

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
            pass
    def bar is shared
        .foo
class Y
    inherits X
    def main is shared
        .bar
        .foo  # .error.

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

Attachments

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

Change History

Changed 11 years ago by hopscc

Changed 11 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 11 years ago by Charles

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