LCOV - code coverage report
Current view: top level - lib - compiler.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 11 11 100.0 %
Date: 2014-11-22 Functions: 5 6 83.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* compiler.cpp -- written by Alexis WILKE for Made to Order Software Corp. (c) 2005-2014 */
       2             : 
       3             : /*
       4             : 
       5             : Copyright (c) 2005-2014 Made to Order Software Corp.
       6             : 
       7             : http://snapwebsites.org/project/as2js
       8             : 
       9             : Permission is hereby granted, free of charge, to any
      10             : person obtaining a copy of this software and
      11             : associated documentation files (the "Software"), to
      12             : deal in the Software without restriction, including
      13             : without limitation the rights to use, copy, modify,
      14             : merge, publish, distribute, sublicense, and/or sell
      15             : copies of the Software, and to permit persons to whom
      16             : the Software is furnished to do so, subject to the
      17             : following conditions:
      18             : 
      19             : The above copyright notice and this permission notice
      20             : shall be included in all copies or substantial
      21             : portions of the Software.
      22             : 
      23             : THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
      24             : ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
      25             : LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
      26             : FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
      27             : EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
      28             : LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
      29             : WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
      30             : ARISING FROM, OUT OF OR IN CONNECTION WITH THE
      31             : SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
      32             : SOFTWARE.
      33             : 
      34             : */
      35             : 
      36             : #include    "as2js/compiler.h"
      37             : 
      38             : 
      39             : namespace as2js
      40             : {
      41             : 
      42             : 
      43             : 
      44             : 
      45             : 
      46             : 
      47             : 
      48             : /** \brief Initialize the compiler object.
      49             :  *
      50             :  * The compiler includes many sub-classes that it initializes here.
      51             :  * Especially, it calls the internal_imports() function to load all
      52             :  * the internal modules, database, resource file.
      53             :  *
      54             :  * The options parameter represents the command line options setup
      55             :  * by a user and within the code with the 'use' keyword (i.e. pragmas).
      56             :  *
      57             :  * \param[in] options  The options object to use while compiling.
      58             :  */
      59        9339 : Compiler::Compiler(Options::pointer_t options)
      60             :     : f_time(time(nullptr))
      61             :     //, f_optimizer(nullptr) -- auto-init
      62        9339 :     , f_options(options)
      63             :     //, f_program(nullptr) -- auto-init
      64             :     //, f_input_retriever(nullptr) -- auto-init
      65             :     //, f_err_flags(0) -- auto-init
      66             :     //, f_scope(nullptr) -- auto-init
      67             :     //, f_modules() -- auto-init
      68             : {
      69        9339 :     internal_imports();
      70        9339 : }
      71             : 
      72             : 
      73        9339 : Compiler::~Compiler()
      74             : {
      75        9339 : }
      76             : 
      77             : 
      78           1 : InputRetriever::pointer_t Compiler::set_input_retriever(InputRetriever::pointer_t retriever)
      79             : {
      80           1 :     InputRetriever::pointer_t old(f_input_retriever);
      81             : 
      82           1 :     f_input_retriever = retriever;
      83             : 
      84           1 :     return old;
      85             : }
      86             : 
      87             : 
      88             : 
      89             : 
      90             : 
      91             : 
      92             : 
      93             : 
      94             : 
      95             : 
      96          63 : }
      97             : // namespace as2js
      98             : 
      99             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.10