Well, as H4X0RZ said, making some fancy Lua interface is probably better. Lua lets you do some nice syntactical things:
new "button" at (5, 5) {
text = "Hello!";
}
style "dark" {
["background-colour"] = colours.grey;
}
However, if you're set on writing a custom language, you'll probably want to follow these steps:
Lexing - Breaking some input text into a series of 'tokens'. A token is some object in the text, like a word or a number. If you get the lexing right, you won't have to worry about whitespace, and you'll easily be able to parse (the next step) the input.
Parsing - Converting the tokens into an AST. An AST (abstract syntax tree) is a format that represents your language. For HTML, you might want something like:
{ type = "h1", attributes = {}, body = {
{ type = "span", body = "Hello world!" };
{ type = "a", attributes = { href = "some-url" }, body = "a link ooooh" };
} }
Once you've parsed it, it'll be much easier to deal with. You can then get around to code generation. If I were you, I'd make some form of GUI API or use an existing one. Then your code generation can hook into that, for example if the user wants a button at (5, 5), you could just generate the code:
GUIAPI.addButton( 5, 5 )
There are a few GUI APIs these lying around on the forums, which you'd be able to use.