ddmd 0.0.3

DMD Compiler Frontend


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Overview:

This project is a port of the DMD frontend, automatically translated from C++ to D using magicport2. The current version is based on dmd 2.067.

This project is designed to be built with dub. (dub package)

Currently only the lexer and some support modules are included.

This project may eventually be merged into dmd upstream development. No stable API is provided.

As the code is automatically generated, pull requests should be made against upstream.

Warnings and deprecations currently need to be disabled for the code to compile successfully.

Example:

{
    "name": "ddmdlexertest",
    "dependencies": {
        "ddmd": ">=0.0.1"
    },
    "buildRequirements": [
        "silenceWarnings",
        "silenceDeprecations"
    ]
}
import std.stdio;
import std.file;

import ddmd.tokens;
import ddmd.lexer;

/////////////////////////

void main()
{
    Lexer.initLexer();

    string data = "void blah() {} // stuff";
    auto l = new Lexer("myfile", data.ptr, 0, data.length, 0, 0);
    l.nextToken();
    do
    {
        printf("token: %s\n", l.token.toChars());
    }
    while (l.nextToken() != TOKeof);
}
Authors:
  • Walter Bright
Dependencies:
none
Versions:
0.0.7 2016-May-06
0.0.6 2016-Jan-16
0.0.5 2015-Jun-11
0.0.4 2015-Apr-05
0.0.3 2015-Feb-22
Show all 8 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 293 downloads total

Score:
1.6
Short URL:
ddmd.dub.pm