forked from radare/gtkaml3
/
.plan
59 lines (39 loc) · 1.89 KB
/
.plan
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
TODO (20110320): ComplexAttributes and tests adding and more
-- MarkupParser
parse (); -> creates unresolved syntax tree
generate_public_declarations (); -> so that other sources depending on this are properly compiled
-- MarkupResolver -
resolve_tags (); //Unresolved Tags->MarkupTemp or ComplexAttributes
resolve_attributes () -> resolve creation method, composition and the rest of attribute types
generate (); -> writes the rest of the code
base.resolve (); -> Vala.SymbolResolver
???
=============================
Profit!
=============================
AST:
resolve ()
1. if it's not (a candidate for) attribute, resolve own data type
1.1 if exists, it's MarkupTemp
1.2 if not exists, it's a ComplexAttribute (w/ text as children, or MarkupRoot node). Add to parent.
2. recurse step 1. over children
resolve_hints? ():
3. cherry-pick creation and composition methods => parameter resolution
Given a data type, set aside creation parameters. These will be used with base() or base.parameter etc.
(DONE for creation methods of temps. TODO for all tags, and for composition methods)
4. recurse step 3. over children
resolve_attributes ():
5. attribute resolution. Recurse over children
TODO: unroll the resolving loop so that it's recursive and can be re-used from ComplexAttribute (with the resolver's help)
(hint: ComplexAttribute should not derive from MarkupTag. Instead, it should *have* a MarkupRoot)
=====TODO======!!!
rename MarkupSubTag => MarkupChildTag
rename SimpleMarkupAttribute => MarkupSimpleAttribute
rename UnresolvedMarkupTag => MarkupUnresolvedTag
WTF's the difference between Symbol and DataType?
Short answer: A symbol has one or more data types
!Define the exact order of determining attributes, complex attributes etc. given that some (g:preconstruct for example) are built-in!!
!I am on it
==VALA bugs==
Resolver is not reentrant
BooleanLiteral _requires_ source reference or else