Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Example:
- If(1)
- Dot(12)
- PersoRef: fix|0x00010C84 ([World] GlobalActorModel | global)
- DsgVarRef: 38
- Then(8)
- If(0)
- fn_p_stBooleanCondition(1)
- fn_p_stBooleanCondition(1)
- Dot(12)
- PersoRef: fix|0x00010C84 ([World] GlobalActorModel | global)
- DsgVarRef: 32
- Dot(12)
- PersoRef: fix|0x00010C84 ([World] GlobalActorModel | global)
- DsgVarRef: 33
- fn_p_stBooleanCondition(1)
- Dot(12)
- PersoRef: fix|0x00010C84 ([World] GlobalActorModel | global)
- DsgVarRef: 34
- Dot(12)
- PersoRef: fix|0x00010C84 ([World] GlobalActorModel | global)
- DsgVarRef: 35
- create rootnode
- parentStack = new List
- parentStack.push(rootnode);
- var lastline = null;
- foreach(line) {
- create node for line
- node.parent = parentStack.top();
- if (lastLine) {
- if (line.indent > lastLine.indent) {
- parentStack.push(node);
- }
- if (line.indent < lastLine.indent) {
- indentDiff = lastLine.indent - line.indent
- repeat (indentDiff) {
- parentStack.pop();
- }
- }
- } else { // first line always
- parentStack.push(node);
- }
- lastLine = line;
- }
- A
- B
- C
- D
- E
Add Comment
Please, Sign In to add comment