From 9eb1adc5d8a624ac694bc84720e2d5479cc91bbb Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 5 Dec 2010 01:47:26 +0000 Subject: Check constructors first (implying no special forms start with an uppercase letter). git-svn-id: http://svn.drobilla.net/resp/resp@301 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/parse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parse.cpp b/src/parse.cpp index 21a9963..81aaa83 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -40,12 +40,12 @@ PEnv::parse(const AST* exp) THROW_IF(tup->empty(), exp->loc, "Call to empty list"); const ALexeme* form = tup->head()->to_lexeme(); if (form) { + if (isupper(form->cppstr.c_str()[0])) // Call constructor (any uppercase symbol) + return parseTuple(*this, tup); + const PEnv::Handler* h = handler(form->cppstr); if (h) return h->func(*this, exp, h->arg); // Parse special form - - if (isupper(form->cppstr.c_str()[0])) // Call constructor (any uppercase symbol) - return parseTuple(*this, tup); } return parseTuple(*this, tup); // Parse regular call -- cgit v1.2.1