Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Added "base types" to extension types. #41

Closed
wants to merge 1 commit into
from
Commits on Jan 23, 2013
  1. Added "base types" to extension types.

    jmalloc committed Jan 23, 2013
    This allows for a syntax whereby an extension type is literally an extension to an existing type.
    For example, in the constraints library I am writing I would like to be able to constrain an integer to a certain range,
    the syntax extension in this pull requests allows the following:
    
        @param integer:Constraint { min: 0, max: 200 }
    
    I think this is quite expressive and allows for even greater flexibility. The previous syntax remains:
    
        @param :Constraint { min: 0, max: 200 }
    
    In this case, the "base type" simply defaults to a MixedType.