Kingcom / armips

An assembler for various ARM and MIPS platforms. Builds available at http://buildbot.orphis.net/armips/
MIT License
363 stars 77 forks source link

Disallow file directives within area/region/func #182

Closed unknownbrackets closed 4 years ago

unknownbrackets commented 4 years ago

Fixes #180. Now an error is shown for any open or close directive within area, region, or func.

Rather than add global state to Global, I've added a state parameter to each Validate() method. This makes it more straight forward to handle nested structures, i.e.:

.area 123
.func Foo
.close ; Cannot close inside func
.endfunc

.close ; Cannot close inside area
.endarea

-[Unknown]

Kingcom commented 4 years ago

Nice!