hxml file, which told the compiler to load and lexically scan the HelloWorld class.
This is the base class. When you write classes in haXe, it is important to name the files after the classes
they contain. This way, when the compiler processes your code, it knows what files to load based on the
names of the classes. As the compiler scanned the base class, it checked for any new class names, which
it also loaded and lexically scanned. Once all of the haXe code was loaded and scanned, it proceeded to
convert the syntax to the equivalent SWF byte code. The compiler then constructed the necessary SWF
byte codes required in all Flash files and combined the two into a single file.
The same process is performed with any of the supported platforms, the only difference being that
the compiler translates the resulting code differently. For example, when compiling to JavaScript, the
compiler will scan the code and form the same structures in memory as before. However, when
Chapter 2: Installing and Using haXe and Neko
19
constructing the resulting JavaScript output, the compiler produces a small framework of cross - browser
functionality before continuing to add all of the translated functionality.
Pages:
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71