Skip to content

Commit

Permalink
வாழ்கையே பொய் அல்ல, மெய் காற்றடைந்த பை அல்ல!
Browse files Browse the repository at this point in the history
  • Loading branch information
Muthiah Annamalai committed Mar 19, 2015
1 parent 3781e82 commit 38080b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ezhil/runtime.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/python
##
## -*- coding: utf-8 -*-
## (C) 2007, 2008, 2013 Muthiah Annamalai
## Licensed under GPL Version 3
##
Expand Down Expand Up @@ -201,6 +201,8 @@ def has_id(self, idee):
rval = False
if idee in ['True', 'False']:
return True
if idee in [u"மெய்", u"பொய்"]:
return True
if ( len( self.local_vars ) == 0 ):
return False
variables = self.local_vars[-1]
Expand All @@ -222,6 +224,8 @@ def get_id(self, idee):
val = None
if idee in ['True', 'False']:
return (idee == 'True')
if idee in [u"மெய்", u"பொய்"]:
return (idee == u"மெய்")
if not self.has_id(idee):
note = ''
if idee in keyword.kwlist:
Expand Down
8 changes: 7 additions & 1 deletion tests/boolean.n
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

பதிப்பி "வணக்கம்!", assert( 1 > 0 )
பதிப்பி assert( False == False ), assert( False != True ), assert( True == True )
assert( False )
assert( !False )

x = [ மெய், பொய் ]
பதிப்பி "வணக்கம்!", மெய்
பதிப்பி assert( பொய் == பொய் ), assert( மெய் != பொய் ), assert( மெய் == மெய் )
assert( பொய் || False || மெய்)

பதிப்பி "******* வணக்கம்! பின்னர் உங்களை பார்க்கலாம். *******"
exit()

0 comments on commit 38080b7

Please sign in to comment.