Changeset 13801 for src/Pugs/AST.hs

Show
Ignore:
Timestamp:
10/03/06 11:41:18 (2 years ago)
Author:
audreyt
Message:

* Move typeOfParam into Pugs.AST.

This is used in the previous commits to implement class-wide
attributes with accessors, namely "class C { my $.x }".

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/AST.hs

    r13778 r13801  
    1818    mergeStmts, isEmptyParams, 
    1919    newPackage, newType, newMetaType, typeMacro, isScalarLValue, 
    20     filterPrim, filterUserDefinedPad, 
     20    filterPrim, filterUserDefinedPad, typeOfParam, 
    2121 
    2222    module Pugs.AST.Internals, 
     
    337337    "$*OUT $*ERR $*ARGS $/ %*ENV $*CWD @=POD $=POD $?PUGS_VERSION " ++ 
    338338    "$*OS &?BLOCK_EXIT %?CONFIG $*_ $*AUTOLOAD $*PUGS_VERSION" 
     339 
     340typeOfParam :: Param -> Type 
     341typeOfParam p = case v_sigil (paramName p) of 
     342    SScalar -> typeOfCxt (paramContext p) 
     343    s       -> typeOfSigil s 
     344 
     345