Sha256: 331e4f9a3cda91a7913e635e4ba6c4620089e7c63904a26f87d7c15b23da5158

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

module test.simple;

import std.stdio;

alias AliasInt = int;

struct Struct
{
	union Union
	{
		bool quxx;
		int qar;
	}
}

enum Enum : int
{
	foo,
	bar,
}

interface Interface
{
	public AliasInt bar();
}

class Class : Interface
{
	private AliasInt _bar;

	public this(AliasInt x)
	{
		this._bar = x;
	}

	public AliasInt bar()
	{
		return this._bar;
	}
	
	protected:
	auto tfun(T)(T v)
	{
		return v;
	}
	
	class CT(T)
	{
		T member;
		enum missing = T.init; // FIXME
	}
}

public
{
	int modulevar;
}

// declaration templates
interface IT(T){}
struct ST(T){}
union UT(T){}
// FIXME - parsed as 'T'
//alias AT(T) = T;
//enum ET(T) = T.init;

template Template(alias a, T...)
{
	alias TemplateAlias = a!T;
}

Object obj;

private:
int i;

/+ 
int error;
 +/

static if (is(typeof(__traits(getMember, a, name)) == function))
	T conditional;

static assert( num < TL.length, "Name '"~name~"' is not found");

__gshared int globalVar;

void main(string[] args)
{
	auto foo = new Class(1337);

	alias string AliasString;
	AliasString baz = "Hello, World!";

	writefln("%s", foo.bar());
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ctags.rb-1.1.4 ext/vendor/ctags/Units/parser-d.r/simple.d.d/input.d
ctags.rb-1.1.3 ext/vendor/ctags/Units/parser-d.r/simple.d.d/input.d