Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
GEOTRANSFORM "start", "end" casted to START END #50
from mappyfile.parser import Parser from mappyfile.pprint import PrettyPrinter from mappyfile.transformer import MapfileToDict from mappyfile.validator import Validator def output(s, include_position=True, schema_name="map"): """ Parse, transform, validate, and pretty print the result """ p = Parser() m = MapfileToDict(include_position=include_position) ast = p.parse(s) d = m.transform(ast) v = Validator() errors = v.validate(d, schema_name=schema_name) pp = PrettyPrinter(indent=0, newlinechar=" ", quote="'") s = pp.pprint(d) print s assert(len(errors) == 0) return s s = """ STYLE SIZE 0 GEOMTRANSFORM "end" END """ output(s, schema_name="style")
That's a nasty one..!
Would you be able to check if the following is valid Mapfile syntax:?
If so I can add a check just for the "end" keyword when part of a list of valid values.
yes it does work with
It didn't with
But it seems it's only a warning.