Esempio n. 1
0
        public void ProgramParsesReturnStatementWithUnsignedInteger()
        {
            string code            = @"
int main()
{
    return 420u;
}
";
            var    program         = new ProgramNode();
            var    function        = new FunctionNode(program, "main", new List <FunctionParameter>());
            var    returnStatement = new ReturnNode(function);
            var    returnValue     = new UIntNode(returnStatement, 420u);

            returnStatement.AddChild(returnValue);
            function.AddChild(returnStatement);
            program.AddChild(function);

            AssertResultMatchesExpectedProgram(code, program);
        }
Esempio n. 2
0
 public static Node NewUInt(uint u)
 {
     UIntNode node = new UIntNode(u);
     return node;
 }