Code Monkey home page Code Monkey logo

luax's Introduction

Hey!

My name is Nikolay Gekht or @nikolaygekht at github.

You can also find me in the other places:

I earned my first money back in 1988 (I was in high school) developing receipe management software for a milk factory. It ran a Soviet copy of PDP-11 microcomputer called DVK and was written in pure K&R C. Then there were years of assembler programming for 8080, Z80, 8086, 80386. Then came Windows 3.0 and C++. 20 years, dozen of languages and handful of OSes later, I currently mostly use C# and occasionally develop cross-platform Windows/Linux apps.

Last few years, while still acting as a architect and project leader, I shifted my focus to organization of the development team, business agility and... education.

As an educator I deliver Microsoft's C# developer and Azure developer as well as ICAgile's ICP course. For sure, I am open for coaching and mentoring about development or Agile questions. Please feel free to take a look at my courses flyer

So... welcome to my page and don't forget to take a look at my company's page, most of open source projects, that I support, are located there @gehtsoft-usa.

luax's People

Contributors

ipetrovich86 avatar nikolaygekht avatar teo1962 avatar themidgardwatcher avatar vertexts avatar ydergachev-gsg avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

luax's Issues

Не работает конкатенация с вызовом метода

var terminal: ITerminal;
var message: string;
...
message = "Terminal type. expected '" .. TerminalType.TRADING .. "', actual '" .. terminal.getType() .. "'";
                                                                               ^

При компиляции выдает ошибку:

Unhandled exception. Luax.Parser.Ast.LuaXAstGeneratorException: TerminalTest.luax(15,88) : 
The class name or an object expression is expected here

Если terminal.getType() заменить на переменную, отработает без ошибок.

Endless loop in the case of inheriting itself

class TerminalFactory: TerminalFactory
    public function createTerminal(name: string) : void
    end
end
 var factory: TerminalFactory;
 factory = new TerminalFactory();
 factory.createTerminal("SomeTerminalName");

Actual Result:
The process has entered into an endless loop

Expected Result:
Сompilation error

Exception on undeclared parent class case

При объявлении в качестве родителя класса имени неопределённого класса

class someClass : unknownClass
end

возникает:

Unexpected exception:
System.NullReferenceException: Object reference not set to an instance of an object.

vscode syntax: numbers with underscore

Numeric constants with an underscore aren't supported

e.g.

assert.isTrue(0x1234_abcd == 0x1234_abcd, "underscore in hex");
assert.isTrue(1_234_567 == 1234567, "underscore in integer");
assert.isTrue(1_234.567_890e2 == 123456.789, "underscore in real");

Just in case, the regular expression for underscored numbers you can take in the colorer's definition file.

Incorrect syntax error position information on function with attributes

В следующем примере, при отсутствии определения класса 'unknownClass', в сообщении об ошибке будет указана позиция первого атрибута (здесь '@theory()'), а не функции.

@Theory()
@TheoryData("", "")
@TheoryData("abc", "a")
@TheoryData("abcde\nqwerty", "aq")
@TheoryData("abcdef\nqwerty\n12345", "aq1")
public function testGetFirstLetters(arg : string, expected : string) : unknownClass
   assert.isTrue((new getFirstLetters()).process(arg) == expected, "");
end

undefined type in declaration

When a variable in a function or property in a class is declared with undefined type, then the parser doesn't generate an error.

Remove needless frames from the call stack

Currently, every call of ProcessStatements adds a new frame into the stack call.

Try to run

class Program
    static function Main() : void
        f1();
    end
    static function f1() : void
        if true then
            f2();
        end
    end
    static function f2() : void
        while true do
            if not false then
                f3();
            end
        end
    end

    static function f3() : int
        return 1 / 0;
    end
end

The call stack will be:

LuaXExecutionException: Attempted to divide by zero..
    at Program.f3() in q.luax(19,9)     <- correct (exception site)
    at Program.f2() in q.luax(13,17)    <- correct (f3 call)
    at Program.f2() in q.luax(12,13)    <- not correct (if)
    at Program.f2() in q.luax(11,9)     <- not correct (while)
    at Program.f1() in q.luax(7,13)     <- correct (f2 call)
    at Program.f1() in q.luax(6,9)      <- not correct (if)
    at Program.Main() in q.luax(3,9)    <- correct (f1 call)

Please use right this example to add into unittest (LuaX.Interpreter.Test). Consider adding other constructions (e.g. try, for, repeat) as they are developed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.