예제 #1
0
파일: buffer.cpp 프로젝트: tosca-lang/tosca
    Sink& BufferSink::StartMap()
    {
        std::string symbol("dummy");
        Start(MakeTerm(symbol));

        return *this;
    }
//-----------------------------------------------------------------------------
//	Makes a complete expression :: <term> { <cond> <term> }.
//-----------------------------------------------------------------------------
static void MakeExpression( ExprTree& tree )
{
	// Make a term, setting Tree to point to it
	MakeTerm( tree );

	// while the next token is a conditional
	while ( IsConditional( mCurToken ) )
	{
		// Make a conditional node, setting left child to Tree and right to NULL. (Tree points to new node)
		MakeExprNode( tree, mCurToken, CONDITIONAL, tree, NULL );

		// Get the next token.
		GetNextToken();

		// Make a term, setting the right child of Tree to point to it.
		MakeTerm( tree->right );
	}
}