Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ilangNew to Visual Studio Code? Get it now.
ilang

ilang

vanishmax

|
282 installs
| (1) | Free
A language server for imperative language called i
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Imperative language LSP extension

Language Server Protocol – highly powerful tool for syntax higlight, auto-complete, validation etc. for your language.

This extension provides an LSP (server + client) for the imperative language with following grammar:

Program : { SimpleDeclaration | RoutineDeclaration }

SimpleDeclaration : VariableDeclaration | TypeDeclaration

VariableDeclaration
    : var Identifier ':' Type [ is Expression ]
	| var Identifier is Expression

TypeDeclaration : type Identifier is Type

RoutineDeclaration
    : routine Identifier ( Parameters ) [ ':' Type ]
    is Body end

Parameters
    : ParameterDeclaration { ',' ParameterDeclaration }

ParameterDeclaration
    : Identifier : Type

Type : PrimitiveType | ArrayType | RecordType | Identifier

PrimitiveType : integer | real | boolean

RecordType : record { VariableDeclaration } end

ArrayType : array '[' [ Expression ] ']' Type


Body : { SimpleDeclaration | Statement }

Statement : Assignment | RoutineCall
    | WhileLoop | ForLoop | IfStatement 

Assignment : ModifiablePrimary ':=' Expression

RoutineCall
    : Identifier [ '(' Expression { ',' Expression } ')' ]

WhileLoop : while Expression loop Body end

ForLoop : for Identifier Range loop Body end

Range : in [ reverse ] Expression .. Expression

IfStatement : if Expression then Body [ else Body ] end


Expression : Relation { ( and | or | xor ) Relation }

Relation : Simple
	[ ( '<' | '<=' | '>' | '>=' | '=' | '/=' ) Simple ] Simple :Factor{('*'|'/'|'%')Factor}

Simple : Factor{( * | / | % )Factor}

Factor : Summand { ( '+' | '-' ) Summand }

Summand : Primary | '(' Expression ')'

Primary : [ Sign | not ] IntegerLiteral
    | [ Sign ] RealLiteral
    | true
    | false
    | ModifiablePrimary
    | RoutineCall

Sign : '+' | '-'

ModifiablePrimary
    : Identifier 
    	{ '.' Identifier
    	| '[' Expression ']'
        }

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft