Feature #927
Add "exit" in addition to "ciao"
Related issues
History
#1 Updated by Anna Maria Bigatti over 7 years ago
- Target version set to CoCoA-5.2.0 spring 2017
#2 Updated by John Abbott over 7 years ago
- Category set to CoCoA-5 function: new
I think it should not be too hard to add an "exit" command, but this means introducing a new keyword which could, in principle, break existing code (if someone has used "exit" as a variable/fn name).
#3 Updated by John Abbott over 7 years ago
- Status changed from New to Resolved
- Assignee set to John Abbott
- % Done changed from 0 to 80
What I did to add command "exit".
cd src/CoCoA-5
fgrep Ciao Lexer.C
--> Keyword("Ciao", TT_CIAO)
In Lexer.H add TT_EXIT to enum TokenType
In Lexer.C add Keyword("Exit", TT_EXIT) to keywordTable
In Parser.C 3 changes:
(1) add case TT_EXIT to UnexpectedTokenException::humanReadable(...)
(2) add case TT_EXIT to mayStartOrFollowAStatement(...)
(3) add case TT_EXIT to Parser::parseFunBodyStatement()
In AST.C 2 changes:
(1) add appropriate dumpAsString(...) mem fn
[in this case just modify an existing one]
(2) add appropriate DumpAsTreeVisitor::visit(...) fn
[in this case just modify an existing one]
In C5.C add "Exit" to keywordRE (in CocoaHighlighter ctor around line 460)
Running "make" produced a CoCoAInterpreter but "exit" did not work properly.
After doing "make clean; make" it worked fine.
PS I also added "exit" to the CoCoAManual!
#4 Updated by John Abbott over 7 years ago
- Related to Bug #928: ciao, exit, quit can be used not only at top level added
#5 Updated by John Abbott over 7 years ago
I have added the keywords exit
and quit
to the file cocoa5.el
.
#6 Updated by John Abbott over 7 years ago
- Status changed from Resolved to Feedback
- % Done changed from 80 to 90
I have also change the "goodbye pop-up window" in the GUI so that it says "Ciao" instead of "Bye".
#7 Updated by Anna Maria Bigatti about 7 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
- Estimated time set to 1.56 h