Unable to understand error messages

Hi all. I have been working on a small project of mine. A programming language.
https://github.com/agt-ishan/dolber
Above link is it's git repository.

I have been getting very strange error messages that make no sense to me.
The errors are produced by clang. Check the attached TAR archive. No. Don't check the github.

Here are the contents of the archive
.
|-- LICENSE
|-- README.md
`-- src
    |-- errors.txt
    |-- include
    |   |-- token.hpp
    |   |-- tokenizer.hpp
    |   `-- tokenTypes.hpp
    |-- main.cpp
    |-- makefile
    |-- token.cpp
    `-- tokenizer.cpp


Downloads:
https://drive.google.com/file/d/0B4b2rRVTT5LCREwxRzZ2T0lNRUU/edit?usp=sharing
https://drive.google.com/file/d/0B4b2rRVTT5LCWi0wblQwOFhVR1E/edit?usp=sharing

The errors:
http://pastie.org/8453576#24
Highlighted line onwards.
COMMA is a member of the tokenType enum.
I have a constructor for token with
token(tokenType type)
But it gives some incomprehensible error about a type mismatch.

Help will be greatly appreciated. Thanks

-Ishan
Last edited on
It's been three hours. Please help!
I don't think that someone wants to open that tar file.

post the code where the first error appears hpp and cpp.

often when strange errors appear then a #define is the culprit
> https://github.com/agt-ishan/dolber
> Above link is it's git repository.
> Check the attached TAR archive. No. Don't check the github.
¿what's the point then?

> I have a constructor for token with
> token(tokenType type)
> But it gives some incomprehensible error about a type mismatch.
You are misreading. It does not complain about token(COMMA), it complains about the return
Your function is supposed to return a `token' object, but for some reason you killed the token(const token&) copy constructor.
Instead you are using token(token&), as you cannot bind a temporary to a non-const reference, it fails.

So, you need to observe const-correctness
Last edited on
@coder777:
I don't use any #defines in my code. They're ugly.
There is a zip also.

@ne555:
Thanks for the answer. The git is slightly outdated as i'm yet to push the changes.


Thanks guys. It really helped!

^X^S (OOPs... Seem to think everything is emacs!)
Topic archived. No new replies allowed.