1 /* This file is part of Shapes.
3 * Shapes is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
8 * Shapes is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with Shapes. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright 2008, 2010 Henrik Tidefelt
26 #include "shapestypes.h"
34 class CoreFunction
: public Lang::Function
39 CoreFunction( const char * title
);
40 CoreFunction( const char * title
, Kernel::EvaluatedFormals
* formals
);
41 virtual void analyze_impl( Ast::Node
* parent
, Ast::AnalysisEnvironment
* env
, Ast::StateIDSet
* freeStatesDst
);
42 virtual bool isTransforming( ) const;
43 const char * getTitle( ) const;
44 virtual void show( std::ostream
& os
) const;
45 virtual void gcMark( Kernel::GCMarkedSet
& marked
){ };
49 /* This core function is declared here so that its static member function can be used from other files than coreconstruct.cc. */
50 class Core_range
: public Lang::CoreFunction
53 Core_range( const char * title
);
54 virtual void call( Kernel::EvalState
* evalState
, Kernel::Arguments
& args
, const Ast::SourceLocation
& callLoc
) const;
55 static void makeRange( const char * title
, Kernel::EvalState
* evalState
, Kernel::Arguments
& args
, const Ast::SourceLocation
& callLoc
, bool isSpan
= false, RefCountPtr
< const Lang::Value
> last
= RefCountPtr
< const Lang::Value
>( NullPtr
< const Lang::Value
>( ) ) );