Added syntax items 'redo()', 'next()', and 'last()' in Syntax.nqp to base and Full.nqp
[kakapo:kakapo.git] / src / Internals / Full.nqp
1 # Copyright (C) 2009, Austin Hastings. See accompanying LICENSE file, or 
2 # http://www.opensource.org/licenses/artistic-license-2.0.php for license.
3
4 module Kakapo;
5
6 sub is_loaded() {
7         1;
8 }
9
10 # This sub is called directly by code in kakapo_top_pir.tmpl to perform 'very first thing' 
11 # initialization. The intent is to (1) ensure that the environment is initialized, and (2) to 
12 # directly initialize those modules that are prerequisites of just about every other module 
13 # in the system.
14
15 sub _pre_initload() {
16
17         if our $_Pre_initload_done { return 0; }
18         $_Pre_initload_done := 1;
19         
20         unless Opcode::defined(say) {
21                 Opcode::load_language('nqp');
22         }
23         
24         unless Opcode::defined(P6object::HOW) {
25                 Opcode::load_bytecode('P6object.pbc');
26         }       
27         
28         # Note: Order is crucial.
29         Global::_pre_initload();
30         Opcode::_pre_initload();
31         Parrot::_pre_initload();
32         Pir::_pre_initload();
33         Array::_pre_initload(); # Compiling 'new' wants 'join'
34         Kakapo::Pmc::COMMON::_pre_initload();
35         String::_pre_initload();
36         Exception::_pre_initload();
37         Syntax::_pre_initload();
38
39         # Base / Complete divider
40
41         P6metaclass::_pre_initload();
42         P6object::_pre_initload();
43
44         DependencyQueue::_pre_initload();
45         #Class::_pre_initload();
46         #Program::_pre_initload(
47                 # 'Global', 
48                 # 'Dumper', 
49                 # 'Opcode', 
50                 # 'Undef',
51                 # 'Parrot', 
52                 # 'P6metaclass', 
53                 # 'P6object', 
54                 # 'Pir', 
55                 # 'Kakapo::Pmc::COMMON',
56                 # 'Class', 
57                 # 'Exception',
58                 # 'DependencyQueue', 
59                 # 'Program',
60         # );
61 }
62
63 sub library_init_done() {
64         say("Library init done");
65         # Base does nothing.
66 }
67
68 sub library_load_done() {
69         say("Library load done");
70         # Base does nothing.
71 }
72