Commit 78f016d1 authored by Sarah Spall's avatar Sarah Spall Committed by Vikram Narayanan

scope init code

parent f9c94ba0
#include "lcd_ast.h"
Scope::Scope()
{
// init builtin int types
builtin = new map<PrimType, Type>();
// instert for each builtin in type, add size to type if not done alreayd
builtin->insert( std::pair<int,Type>(1, new IntegerType(kChar, false, sizeof("char"))));
builtin->insert( std::pair<int,Type>(1, new IntegerType(kChar, true, sizeof("char"))));
builtin->insert( std::pair<int,Type>(1, new IntegerType(kShort, false, sizeof("short"))));
builtin->insert( std::pair<int,Type>(1, new IntegerType(kShort, true, sizeof("short"))));
builtin->insert( std::pair<int,Type>(1, new IntegerType(kInt, false, sizeof("int"))));
builtin->insert( std::pair<int,Type>(1, new IntegerType(kInt, true, sizeof("int"))));
builtin->insert( std::pair<int,Type>(1, new IntegerType(kLong, false, sizeof("long"))));
builtin->insert( std::pair<int,Type>(1, new IntegerType(kLong, true, sizeof("long"))));
builtin->insert( std::pair<int,Type>(1, new IntegerType(kLongLong, false, sizeof("long long"))));
builtin->insert( std::pair<int,Type>(1, new IntegerType(kLongLong, true, sizeof("long long"))));
builtin->insert( std::pair<int,Type>(1, new IntegerType(kCapability, false, sizeof("int"))));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment