-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
mbas
54 lines (39 loc) · 1.96 KB
/
mbas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
* mbas: Mono's Basic.NET Compiler.
MBAS is a CIL compiler for the Visual Basic language, an extended
version of VisualBasic.NET. It's based on the MCS compiler
and still in heavy development, though many language features are
already supported.
** What works
<ul>
* Classes, Fields and Methods. Properties are still
being worked on.
* Module definition and Sub functionality (TODO: Function's)
* Namespace Import, so can you reference, instantiate
and call external assemblies
* Parameter passing between Sub's. ByVal and ByRef
parameters are being worked on.
* Delegates
* Object creation
* Events - to a limited extent. You can declare a
Class-Field as 'WithEvents' and dynamic events (i.e
AddHandler MyButton.Click, Button1_OnClick). Please
beware: just after committing the code, I discovered
that the handler field in the AddHandler call is
case-sensitive, a remnant of mBas' mcs heritage)
* Statements supported are 'If..Then..Else' ,
'While..End While' and assignment statements. Simple
operators (+, -, *, /, >, <, =) should also
work. Other statements (For..Next, etc.) should be
quite trivial to implement.
</ul>
A lot of this stuff is implemented rebuilding proper expressions and
statements on top of the classes provided by mcs (look at the grammar -
mb-parser.jay - and compare it with cs-parser.jay, if interested).
** TODO-list
At this stage almost every element of the language must be still checked for
conformance to MS'implementation. Help is particularly needed for those areas
I know little of (mcs internals are still quite obscure to me). I'd like to
implement class properties, the missing statements, exception handling,
structures and actual event support (not necessarily in this order). Once we
have all this stuff set up and reasonably bug-free, more work could be done
on helper functions and Object-vars handling.