[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Don't hardcode a limited set of markup signatures. (issue969046)
From: |
hanwenn |
Subject: |
Re: Don't hardcode a limited set of markup signatures. (issue969046) |
Date: |
Sat, 01 May 2010 19:56:08 +0000 |
http://codereview.appspot.com/969046/diff/7001/8002
File lily/lexer.ll (right):
http://codereview.appspot.com/969046/diff/7001/8002#newcode545
lily/lexer.ll:545: // loop will be EXPECT_NO_MORE_ARGS.
wouldnt it be clearer to have a function
void translate_markup_signature(SCM predicate_list,
vector<int> expect_tokens);
which generates the [expect_scm, expect_scm, expect_markup] (possibly
with expect_no_more_args) in a vector, and then push the tokens one by
one in the desired order?
Also, I think it is better to not use fall-through switches, as they are
a uncommon and tricky idiom.
I would expect something like
if(pred == bla("markup?")
token = EXPECT_MARKUP;
else if (pred == bla("markup-list?")
token = EXPECT_MARKUP_LIST;
else if (pred == bla("scm?")
token = EXPECT_SCM;
http://codereview.appspot.com/969046/show
- Don't hardcode a limited set of markup signatures. (issue969046), hanwenn, 2010/05/01
- Re: Don't hardcode a limited set of markup signatures. (issue969046), dak, 2010/05/01
- Re: Don't hardcode a limited set of markup signatures. (issue969046),
hanwenn <=
- Re: Don't hardcode a limited set of markup signatures. (issue969046), dak, 2010/05/02
- Re: Don't hardcode a limited set of markup signatures. (issue969046), Han-Wen Nienhuys, 2010/05/02
- Re: Don't hardcode a limited set of markup signatures. (issue969046), David Kastrup, 2010/05/02
- Re: Don't hardcode a limited set of markup signatures. (issue969046), Han-Wen Nienhuys, 2010/05/02
- Re: Don't hardcode a limited set of markup signatures. (issue969046), David Kastrup, 2010/05/02
- Re: Don't hardcode a limited set of markup signatures. (issue969046), Han-Wen Nienhuys, 2010/05/02
- Re: Don't hardcode a limited set of markup signatures. (issue969046), David Kastrup, 2010/05/03
- Re: Don't hardcode a limited set of markup signatures. (issue969046), Han-Wen Nienhuys, 2010/05/03
- Re: Don't hardcode a limited set of markup signatures. (issue969046), Kieren MacMillan, 2010/05/03
- Ousting bad people (was: Don't hardcode a limited set of markup signatures. (issue969046)), David Kastrup, 2010/05/03