Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Language reference > Statements > Definition statements > Modules

Module

Module is the top level declaration. It declares a scope which may have an optional name. Modules can contain imports, constants, variables, functions, namespaces, classes and interfaces.

When referring to the scope of the module, either ``module´´ or its name is used. Where referred, module yields an instance of ``anvil.runtime.Scope´´.

  module := "module" [ symbolname ] "{" module-decls "}" 
  module :=  module-decls 
  module-decls =  
    ( import  
    | constant  
    | variable  
    | function  
    | namespace 
    | class  
    | interface ) * 
See also  | Import  | Definition statements  | <module>  | Grammar
Contributes notes:
Add a note
What's new | Anvil