Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nddrylliog
committed
Oct 1, 2010
1 parent
2311d69
commit 31165e5
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
// function defined in NagaQueen.leg | ||
nq_parse: extern proto func (AstBuilder, CString) -> Int | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
import Node | ||
|
||
/** | ||
* Imports allow a module to use the functions, types, globals defined | ||
* in another module. | ||
* | ||
* Imports are not transitive, ie. if `A` imports `B` and `B` imports `C`, | ||
* `A` won't have access to C's symbols if it doesn't import it explicitly. | ||
*/ | ||
Import: class extends Node { | ||
|
||
importName: String | ||
module: Module { get set } | ||
|
||
init: func (=fullName) {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
import Node | ||
|
||
/** | ||
* A module contains types, functions, global variables. | ||
* | ||
* It has a name, a package, imports (ie. using another module's symbols) | ||
* uses (for native libraries) | ||
*/ | ||
Module: class extends Node { | ||
|
||
/** | ||
* The fullname is somemthing like: "my/package/MyModule". | ||
* It doesn't contain ".ooc", and it's always '/', never '\' even | ||
* on win32 platforms. | ||
*/ | ||
fullName: String | ||
|
||
/** | ||
* List of functions in thie module that don't belong to any type | ||
*/ | ||
functions := ArrayList<FuncDecl> new() | ||
|
||
init: func (=fullName) { | ||
} | ||
|
||
} | ||
|