Skip to content

Instantly share code, notes, and snippets.

void LookupTypeName(const AST::TypeName & tn, EntitySet & entity_list)
{
std::vector<TypePart> parts = ConvertToList(*this, tn);
EntitySet possible_places;
Entity* context = this;
do
{
possible_places.insert(context);
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define TYPE_VALUEARRAY 0
#define TYPE_POINTERARRAY 1
typedef struct value
{
long Type, Rank, Dimensions[3], Elements[2];
Tinytalk include: "stdlib/Tests.tt"
/*
OrderedCollection
The default implementation works with integer keys.
*/
OrderedCollection add-method: { first
"Returns the first element of the collection."
@ghassanpl
ghassanpl / test.st
Last active January 10, 2017 09:13
FFIModule add-method: { add-func: aSymbol
| sym |
sym = mDLL symbol: aSymbol;
sym not-nil assert: "Symbol not found: ", aSymbol to-string;
mFunMap at: aSymbol put: sym;
^ sym;
};
FFIModule add-method: { add-func: aSymbol
| sym |
@ghassanpl
ghassanpl / variant.cc
Last active August 29, 2015 14:17 — forked from tibordp/variant.cc
#include <iostream>
#include <utility>
#include <typeinfo>
#include <type_traits>
#include <typeindex>
#include <string>
using std::type_index;
template<typename... Ts>