diff options
author | rumpf_a@web.de <> | 2010-02-21 23:44:53 +0100 |
---|---|---|
committer | rumpf_a@web.de <> | 2010-02-21 23:44:53 +0100 |
commit | 6da95ed9ca899db702c6a7b17d2d7db14dbb0de4 (patch) | |
tree | d29e92a1e0f863091e5a544a5b55073c7b53be45 /tests/accept/compile | |
parent | d913fdb2800d83680e413cd8a5f07b7f85deac6e (diff) | |
download | Nim-6da95ed9ca899db702c6a7b17d2d7db14dbb0de4.tar.gz |
start of yamllexer
Diffstat (limited to 'tests/accept/compile')
-rw-r--r-- | tests/accept/compile/mvarious.nim | 6 | ||||
-rw-r--r-- | tests/accept/compile/tccgen1.nim | 67 |
2 files changed, 73 insertions, 0 deletions
diff --git a/tests/accept/compile/mvarious.nim b/tests/accept/compile/mvarious.nim new file mode 100644 index 000000000..333b34d33 --- /dev/null +++ b/tests/accept/compile/mvarious.nim @@ -0,0 +1,6 @@ +# Test a submodule + +#type +# TStringArr = array [0.. *] of string + +proc exportme* = nil diff --git a/tests/accept/compile/tccgen1.nim b/tests/accept/compile/tccgen1.nim new file mode 100644 index 000000000..b1d8835f2 --- /dev/null +++ b/tests/accept/compile/tccgen1.nim @@ -0,0 +1,67 @@ + + +type + Feature = tuple[name: string, version: string] + PDOMImplementation* = ref DOMImplementation + DOMImplementation = object + Features: seq[Feature] # Read-Only + + PNode* = ref Node + Node = object + attributes*: seq[PAttr] + childNodes*: seq[PNode] + FLocalName: string # Read-only + FNamespaceURI: string # Read-only + FNodeName: string # Read-only + nodeValue*: string + FNodeType: int # Read-only + FOwnerDocument: PDocument # Read-Only + FParentNode: PNode # Read-Only + prefix*: string # Setting this should change some values... TODO! + + PElement* = ref Element + Element = object of Node + FTagName: string # Read-only + + PCharacterData = ref CharacterData + CharacterData = object of Node + data*: string + + PDocument* = ref Document + Document = object of Node + FImplementation: PDOMImplementation # Read-only + FDocumentElement: PElement # Read-only + + PAttr* = ref Attr + Attr = object of Node + FName: string # Read-only + FSpecified: bool # Read-only + value*: string + FOwnerElement: PElement # Read-only + + PDocumentFragment* = ref DocumentFragment + DocumentFragment = object of Node + + PText* = ref Text + Text = object of CharacterData + + PComment* = ref comment + Comment = object of CharacterData + + PCDataSection* = ref CDataSection + CDataSection = object of Text + + PProcessingInstruction* = ref ProcessingInstruction + ProcessingInstruction = object of Node + data*: string + FTarget: string # Read-only + +proc `namespaceURI=`*(n: var PNode, value: string) = + n.FNamespaceURI = value + +proc main = + var n: PNode + new(n) + n.namespaceURI = "test" + +main() |