Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
670 commits
Select commit Hold shift + click to select a range
cfa32b4
Allow multiline string literals only with @@
ghewgill Aug 10, 2015
e343467
Add tail call optimization
ghewgill Aug 10, 2015
539ec41
Add high resolution stopwatch timer
ghewgill Aug 10, 2015
dfc0b72
Add Darwin-specific stopwatch implementation
ghewgill Aug 11, 2015
84806d4
Adjust code layout for better readability
ghewgill Aug 11, 2015
20a306f
Add error for obviously wrong indentation
ghewgill Aug 11, 2015
f16e678
Expand tabs in source to 8 spaces to report error location correctly
ghewgill Aug 11, 2015
1ae7a63
Fix a few minor errors flagged by cppcheck
ghewgill Aug 11, 2015
699d7bb
Some documentation updates
ghewgill Aug 12, 2015
b76c86b
Fix self parameter mode in declaration of enum to_string()
ghewgill Aug 12, 2015
04cb9a0
Enable tests that now work
ghewgill Aug 12, 2015
5056378
Include additional descriptive message in double line errors
ghewgill Aug 12, 2015
42a4eb7
Use template-based implementation of bitwise functions
ghewgill Aug 13, 2015
c9a2271
Add range checking of input parameters
ghewgill Aug 14, 2015
e060706
Add 64-bit bitwise operations, rename 32 bit functions
ghewgill Aug 14, 2015
b64bef0
Formatting improvements
ghewgill Aug 17, 2015
d8ab1d1
Update library documentation from b64bef0
ghewgill Aug 17, 2015
5ebabdf
Rework internal exception handling for more consistency
ghewgill Aug 17, 2015
3be34d9
Avoid 64 bit shift warning C4334 on MSVC
ghewgill Aug 17, 2015
9ee99c9
Add InvalidFile exception for trying to use a NIL File
ghewgill Aug 24, 2015
da57d0e
Add neon interpreter in python (helium)
ghewgill Aug 25, 2015
5e782c5
Enable debug build on win32
ghewgill Aug 26, 2015
d9d51b3
Avoid dereferencing string iterator pointing to end()
ghewgill Aug 26, 2015
5340a20
Ensure that scons -c cleans all external modules
ghewgill Aug 26, 2015
626a7ba
Merge branch 'master' into win32-debug
ghewgill Aug 26, 2015
5dc24ab
Add scons release switch to enable release build (default is debug)
ghewgill Aug 26, 2015
6bcc1c1
Implement proper topological sort instead of (ab)using std::sort
ghewgill Aug 26, 2015
9e669e1
Detect recursive module import (fixes #77)
ghewgill Aug 27, 2015
0bd1d41
Carry source_path through to Program
ghewgill Aug 31, 2015
2fe0a8d
Start on debug info generation
ghewgill Sep 1, 2015
13e9f94
Use size_t for array index
ghewgill Sep 1, 2015
a0b9f8c
Add grammar railroad diagram
ghewgill Sep 2, 2015
bf078b1
Add formal grammar specification
ghewgill Sep 2, 2015
e4ca6c4
Add garbage collector
ghewgill Sep 3, 2015
11e5e08
Ensure that alloced flag never changes
ghewgill Sep 5, 2015
4fb6700
Add runtime library
ghewgill Sep 5, 2015
f9e4bd3
Manage allocation list using std::list
ghewgill Sep 5, 2015
9590b0d
Avoid hack to make runtime calls to Executor
ghewgill Sep 5, 2015
41073e4
Add set_garbage_collection_interval
ghewgill Sep 5, 2015
0378820
Add runtime.garbage_collect()
ghewgill Sep 5, 2015
3d8e71e
Add required dummy declarations
ghewgill Sep 6, 2015
ecdacb3
Add documentation for runtime module
ghewgill Sep 5, 2015
7d06cb7
Factor out cross platform socket includes
ghewgill Sep 6, 2015
ec48f7d
Create subprocesses in job object
ghewgill Sep 7, 2015
86dc11a
Add runtime.set_recursion_limit() (fixes #78)
ghewgill Sep 7, 2015
cb03c74
Declare fork test as platform-specific
ghewgill Sep 8, 2015
fdec720
Improve spawn handling on posix
ghewgill Sep 8, 2015
6341b82
Added missing keywords in supported editors.
gitlarryf Sep 8, 2015
a874715
Merge pull request #80 from gitlarryf/contrib-editors
ghewgill Sep 8, 2015
a8c10a8
Add 'external' target for building external libs only
ghewgill Sep 8, 2015
51a3f63
Avoid g++ version check unless we're actually using g++
ghewgill Sep 9, 2015
4be73c3
Avoid super long command line that can cause problems on windows
ghewgill Sep 9, 2015
35198b5
Handle backslash escapes when reading json
ghewgill Sep 10, 2015
7240069
Update library documentation from 35198b5
ghewgill Sep 11, 2015
8b2869f
Add http.post()
ghewgill Sep 13, 2015
07f0623
Support returning exception code from native functions
ghewgill Sep 15, 2015
45dcaf6
Return HttpError on curl failure
ghewgill Sep 15, 2015
6fa7891
Add additional debug info to .neond file
ghewgill Sep 15, 2015
9b8b1cc
Add basic interactive debugger support
ghewgill Sep 15, 2015
027bf5e
Update library documentation from 9b8b1cc
ghewgill Sep 15, 2015
a770641
Cast to signed value as needed
gitlarryf Sep 15, 2015
bd459e7
Merge pull request #82 from gitlarryf/debugger-fix
ghewgill Sep 15, 2015
0deacb5
Move helium to tools directory
ghewgill Sep 16, 2015
96bbe63
Add multiarray module
ghewgill Sep 16, 2015
7e444f4
Update library documentation from 96bbe63
ghewgill Sep 16, 2015
d4f1acd
Change internal enums.inc to be uint32_t
ghewgill Sep 16, 2015
678aaf6
Add a bunch more functions to io library
ghewgill Sep 16, 2015
d785489
Expunge old style C casts from codebase
ghewgill Sep 16, 2015
1860ce4
Very small performance improvement on calling predefined functions
ghewgill Sep 16, 2015
cb3b440
Add debugger support module
ghewgill Sep 16, 2015
a562a31
Update library documentation from cb3b440
ghewgill Sep 16, 2015
eeb6774
Fixes for win32 build
ghewgill Sep 16, 2015
7acc1f8
Add some sample module constants
ghewgill Sep 18, 2015
8f705aa
Create temporary files in tmp/ directory
ghewgill Sep 18, 2015
38c6ea7
Fix makethunks to allow code lines with comments
gitlarryf Sep 18, 2015
4f9a36f
Merge pull request #83 from gitlarryf/build-process
ghewgill Sep 18, 2015
0bba8eb
Include lib/*.neon in grammar test; add native constant support
ghewgill Sep 19, 2015
e7b4236
Update for new grammar
ghewgill Sep 19, 2015
33f58ea
Better support for native constants where required
ghewgill Sep 20, 2015
2e7d588
Move another temporary file to tmp/
ghewgill Sep 20, 2015
941411d
Handle exceptions declared in a different module
ghewgill Sep 20, 2015
8f642d9
Parse range subscripts correctly
ghewgill Sep 20, 2015
8e69467
Add a variety of new file module functions
ghewgill Sep 20, 2015
197393b
Add neonbind which binds a neon program into an exe
ghewgill Sep 21, 2015
b723b2a
Add libraries in correct order for linkers where this matters
ghewgill Sep 22, 2015
fc5fae5
Detect error result properly instead of erroneously matching the file…
ghewgill Sep 25, 2015
664a4bd
Add Bytes literal which reads from a file at compile time
ghewgill Sep 25, 2015
d674383
Add 'override' on appropriate debuginfo functions
ghewgill Sep 27, 2015
1a96f67
Added various curses constants
gitlarryf Sep 18, 2015
2fd5808
Merge pull request #90 from gitlarryf/curses-constants
ghewgill Sep 28, 2015
adce379
Rename keyword CONST to CONSTANT
ghewgill Sep 27, 2015
4bbe88c
Change keyword CONST to CONSTANT
ghewgill Sep 28, 2015
3dec23f
Add color to curses sample
ghewgill Sep 26, 2015
2ad63a2
Add tetris sample
ghewgill Sep 26, 2015
ba092ed
Disallow all-uppercase identifiers to avoid future keyword conflicts
ghewgill Aug 31, 2015
9e60152
Update syntax diagram
ghewgill Sep 29, 2015
6f719b3
Add the ability to create and run .neb (neon bundle) files
ghewgill Sep 30, 2015
e09f361
Add failing test for import internal error
ghewgill Sep 30, 2015
da0fb62
Strict type checking for opaque pointer types
ghewgill Sep 30, 2015
05c4274
Introduce InvalidValue exception and an example where it is useful
ghewgill Sep 30, 2015
3a0ad40
Add othello sample
ghewgill Oct 1, 2015
f087da3
Find all neon source files for syntax check
ghewgill Oct 3, 2015
2ead81d
Call CheckLibWithHeader using correct language option
ghewgill Oct 4, 2015
de3a656
Fix weekday calculation in datetime module
ghewgill Oct 4, 2015
a4ad3a7
Call type equivalency function with correct args
ghewgill Oct 5, 2015
34abce7
Move function type equivalence check into TypeFunction
ghewgill Oct 5, 2015
795ae12
Fix string.trim to handle space-only strings
ghewgill Oct 6, 2015
cd40467
Use ALIAS with IMPORT instead of AS
ghewgill Oct 6, 2015
93894f0
Change TYPE to use IS instead of :=
ghewgill Oct 7, 2015
d81bd2a
Update for latest grammar
ghewgill Oct 7, 2015
49bdf79
Fix type compatibility check in VAR initialization
ghewgill Oct 8, 2015
70945da
Fix problem with copy-on-write and double-indexed arrays
ghewgill Oct 9, 2015
2f85576
Add boolean typed multidimensional arrays
ghewgill Oct 11, 2015
39cf109
Add value initialised number arrays
ghewgill Oct 11, 2015
9cb55fd
Add sudoku sample
ghewgill Oct 11, 2015
3c91ec8
Fix crlf line endings
ghewgill Oct 12, 2015
bc77c2b
Add unit test for sudoku sample
ghewgill Oct 12, 2015
6f53f95
Add BEGIN MAIN block for module main code
ghewgill Oct 12, 2015
16f40bc
Implement gc mark() nonrecursively to handle long chains
ghewgill Oct 12, 2015
bed1742
Fix some inefficiencies in some array and dictionary opcodes
ghewgill Oct 13, 2015
f767b29
Improve efficiency of garbage collector a bit
ghewgill Oct 13, 2015
8f95f03
Ensure that aggregate types are marked as such for the gc (fixes #93)
ghewgill Oct 13, 2015
9dd2fa3
Reset value of reused local variables (fixes #46)
ghewgill Oct 13, 2015
5d1348a
Fix order of is_equivalent call
ghewgill Oct 14, 2015
673129a
Add (incomplete) lisp sample
ghewgill Oct 14, 2015
aa70797
Rename function for clarity, fix order in a couple of places (fixes #68)
ghewgill Oct 14, 2015
61be556
Fix array slice edge case (fixes #86)
ghewgill Oct 14, 2015
1620a85
Support OUT parameters in predefined functions (fixes #55)
ghewgill Oct 14, 2015
6e97c43
Add HEXBYTES keyword for hex bytes literals
ghewgill Oct 14, 2015
8532f39
Add parser.cpp to full grammar test dependencies
ghewgill Oct 14, 2015
fbc0715
Limit test dependencies to source files
ghewgill Oct 14, 2015
ed95a9b
Fix problem with embeddd nuls in string table (fixes #29)
ghewgill Oct 14, 2015
1db7c06
Update win32 sample to encapsulate packing and unpacking
ghewgill Oct 15, 2015
bdc86f6
Update documentation
ghewgill Oct 16, 2015
1c30fc2
Update library documentation from bdc86f6
ghewgill Oct 16, 2015
64f2d4c
Fix deserialization of record value
ghewgill Oct 18, 2015
c59d4f1
Update for method names
ghewgill Oct 22, 2015
c240235
Change function name style to avoid underscores
ghewgill Oct 22, 2015
140a8de
Make double underscore in identifiers reserved
ghewgill Oct 22, 2015
5954469
Move sample programs to individual subdirectories
ghewgill Oct 22, 2015
0670068
Added new keywords, and changed identifiers are necessary
gitlarryf Oct 23, 2015
4e35b3b
Merge pull request #96 from gitlarryf/contrib-editors
ghewgill Oct 23, 2015
846ca21
Update library documentation from 4e35b3b
ghewgill Oct 23, 2015
6634ae7
Add samples documentation
ghewgill Oct 26, 2015
08236a8
Update generated documentation from 6634ae7
ghewgill Oct 26, 2015
6cd59f2
Add link to samples
ghewgill Oct 26, 2015
ea168fc
Change to update docs in separate dir
ghewgill Oct 26, 2015
315dfad
Clarify behaviour of NEXT REPEAT statement
ghewgill Oct 27, 2015
eefe03f
Export some useful complex constants
ghewgill Oct 28, 2015
f20c069
Add & operator for Bytes
ghewgill Nov 1, 2015
f79e661
Fix parsing of HEXBYTES literal
ghewgill Nov 1, 2015
aed0ec0
Allow comparison of Bytes
ghewgill Nov 1, 2015
b85749a
Handle OUT Bytes parameter in thunks
ghewgill Nov 2, 2015
3197434
Fix order of popping OUT parameters
ghewgill Nov 2, 2015
876262e
Fix array slice edge case (also fixes #86)
ghewgill Nov 3, 2015
91df30b
Fix source line number when using multiline raw strings (fixes #99)
ghewgill Nov 4, 2015
9a7ee8f
Add sodium interface library
ghewgill Nov 4, 2015
2ef88e9
Update generated documentation from 9a7ee8f
ghewgill Nov 5, 2015
9aeab44
Update generated documentation from 9a7ee8f
ghewgill Nov 5, 2015
59da54e
Fix doc update script to add new files
ghewgill Nov 5, 2015
c58ae92
Rework global function names so C++ symbols have global$ prefix
ghewgill Nov 7, 2015
1b5e232
Add int() function to truncate a number to an integer
ghewgill Nov 7, 2015
5a8cc2c
Update generated documentation from 1b5e232
ghewgill Nov 8, 2015
ae4a7af
Allow concatenating arrays with & operator
ghewgill Nov 10, 2015
206d138
Allow double quotes within string substitution expression
ghewgill Nov 10, 2015
bf481ad
Refactor function argument info into Argument class
ghewgill Nov 12, 2015
93230b9
Require OUT keyword in function calls
ghewgill Nov 12, 2015
f65e645
Update to use new INC vs inc
ghewgill Nov 14, 2015
be834ac
Introduce INC and DEC instead of inc() and dec()
ghewgill Nov 14, 2015
40770a0
Update for INOUT keyword requirement
ghewgill Nov 14, 2015
2929d14
Require INOUT mode specifier on function calls
ghewgill Nov 14, 2015
1b35c18
Update generated documentation from 2929d14
ghewgill Nov 14, 2015
5e57b62
Update grammar diagram
ghewgill Nov 14, 2015
fdbf458
Fix error message 3180
ghewgill Nov 15, 2015
e23ec78
Add required INOUT in win32 test
ghewgill Nov 15, 2015
e982c72
Add uninitialised variable checker
ghewgill Nov 15, 2015
1f2be62
Change Bytes.fromArray to Array<Number>.toArray
ghewgill Nov 15, 2015
49c056e
Update samples to match uninitialised variable rules
ghewgill Nov 16, 2015
aeae508
Add error message for embedded IF expr (fixes #101)
ghewgill Nov 16, 2015
bb7a950
Verify that long lines are read properly with io.readLine()
ghewgill Nov 16, 2015
dd4a7f5
Detect plain identifier as a syntax error (fixes #49)
ghewgill Nov 16, 2015
81d59af
Couple more fixes for inc/INC
ghewgill Nov 16, 2015
4b07545
Allow extracting ranges of bytes (fixes #100)
ghewgill Nov 16, 2015
f9d697b
Fix up a variety of cases of uninitialised variable detection
ghewgill Nov 22, 2015
d3961ba
Add test case for INC to ensure only single evaluation
ghewgill Nov 22, 2015
e1685ed
Add many new integer formats to struct module
ghewgill Nov 24, 2015
9e243c6
Add hasPrefix and hasSuffix to string module
ghewgill Nov 25, 2015
f9eb5b3
Change sys.argv to be an exported variable sys.args (fixes #94)
ghewgill Dec 1, 2015
dcad9ba
Add uninitialised checks for OUT parameters
ghewgill Dec 1, 2015
1fa4145
Reduce scope of sodium tests for improved test run time
ghewgill Dec 1, 2015
7a2f787
Remove unused ctype from predefined variables
ghewgill Dec 1, 2015
783f4f9
Module io stdin/stdout/stderr are no longer functions
ghewgill Dec 1, 2015
b8f6d11
Update generated documentation from 783f4f9
ghewgill Dec 2, 2015
b43864a
Rename from_end to fromEnd
ghewgill Dec 2, 2015
705e31e
Add a couple more built in functions to helium
ghewgill Dec 2, 2015
c70344a
Identify and evaluate intrinsic functions at compile time (fixes #84)
ghewgill Dec 2, 2015
e41053c
Disallow unused imports
ghewgill Dec 9, 2015
83bbf72
Expand size of string table to 32 bit size
ghewgill Dec 10, 2015
949c8f1
Always rebuild all modules, avoiding reading the old bytecode for now
ghewgill Dec 10, 2015
79b1f81
Assignment is deep copy (and fix associated test)
ghewgill Dec 13, 2015
c05ea31
Fix syntax error in test
ghewgill Dec 13, 2015
98ba84d
Allow assignment to _ to discard value
ghewgill Dec 18, 2015
e9240cb
Allow use of _ in OUT parameters
ghewgill Dec 18, 2015
09b0b35
Handle unmatched groups in regex result
ghewgill Dec 18, 2015
9342f88
Add AST visitor interface
ghewgill Dec 19, 2015
ca553e8
Add 'gh-pages/' from commit 'b8f6d11585955281b6c1d30515eeb676b4fea0c3'
ghewgill Dec 24, 2015
192b5f2
Remove generated output from gh-pages directory
ghewgill Dec 24, 2015
45448a6
Update gh-pages branch from gh-pages dir in master
ghewgill Dec 24, 2015
ae94e44
Run docs checks on master branch, also fix up README
ghewgill Dec 30, 2015
8a2f279
Merge SDL branch into master
ghewgill Dec 30, 2015
b113055
Updated editors with latest keywords and changes
gitlarryf Dec 31, 2015
4e3419b
Merge pull request #111 from gitlarryf/contrib-editors
ghewgill Jan 1, 2016
8f5dff8
Support compile time evaluation of comparison expressions
ghewgill Jan 2, 2016
53a0e50
Handle exceptions from compile time evaluation (fixes #110)
ghewgill Jan 2, 2016
a818033
Use \() substitution in example
ghewgill Jan 2, 2016
4a6a95d
Added OTHERS keyword for WHEN clauses
gitlarryf Jan 2, 2016
1bdd7a0
Merge pull request #112 from gitlarryf/when-others
ghewgill Jan 3, 2016
60a9ec6
Fixed minor typos
gitlarryf Jan 3, 2016
ec5d3ea
Merge pull request #113 from gitlarryf/docs-updates
ghewgill Jan 4, 2016
2531d71
Variety of documentation updates
ghewgill Jan 4, 2016
46116df
Avoid adding ignored files to gh-pages branch
ghewgill Jan 4, 2016
daf0d67
Include function header in debug line number info
ghewgill Jan 5, 2016
2a691f1
Some Linux systems need pthread for SDL
ghewgill Jan 6, 2016
1946c9b
Drop correct number of parameters on exception
ghewgill Jan 6, 2016
898a531
Add libressl and integrate with curl build
ghewgill Jan 6, 2016
d7e6a0a
Add binary encoding/decoding library
gitlarryf Jan 2, 2016
e4e7873
Merge pull request #114 from gitlarryf/encoding-libs
ghewgill Jan 7, 2016
5a0cc6f
Add encoding module to Menu.txt
ghewgill Jan 7, 2016
6b38abe
Revert accidentally committed debug switch
ghewgill Jan 7, 2016
2a52401
Check that source does not contain crlf
ghewgill Jan 7, 2016
db32886
Add SDL samples to samples page
ghewgill Jan 8, 2016
e84789a
Add mmap module
ghewgill Jan 10, 2016
4aeedf5
Require DO after EXCEPTION specification
ghewgill Jan 11, 2016
ab1ca47
Changed parameter names to be more clear (fixes #117)
gitlarryf Jan 13, 2016
51581c7
Merge pull request #118 from gitlarryf/encoding-libs
ghewgill Jan 13, 2016
17ba33c
Add required include
ghewgill Jan 13, 2016
7c9c3a8
Rearrange documentation files
ghewgill Jan 14, 2016
b54e689
Execute all documentation samples
ghewgill Jan 14, 2016
1117837
Add some new documentation
ghewgill Jan 14, 2016
1dec6ec
Change AS keyword to WITH in parameter lists
ghewgill Jan 15, 2016
7ffb6b2
Update overview document
ghewgill Jan 18, 2016
805473d
Support array literal [x TO y] syntax
ghewgill Jan 19, 2016
51d7b8d
Update grammar diagram
ghewgill Jan 19, 2016
df5b555
Allow [x,y] subscript with same meaning as [x][y]
ghewgill Jan 21, 2016
01e98ec
Add OS X to Travis build
ghewgill Jan 22, 2016
008c6e9
Require 'Exception' suffix on exception names
ghewgill Jan 24, 2016
a71b2c5
Fix ifdef for use of copyfile() on OS X
ghewgill Jan 27, 2016
059fd94
Test example code snippets in standard library documentation
ghewgill Jan 27, 2016
f4d021c
Use naturaldocs code sample style instead of markdown (duh)
ghewgill Feb 1, 2016
9340418
Add AppVeyor CI Support
gitlarryf Feb 4, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.sconsign.dblite
.sconf_temp/
config.log
*.inc
*.o
*.os
Expand All @@ -9,14 +11,35 @@
*.dylib
*.dll
*.gc*
*.pyc
*.neonx
*.neond
bin/
errors.txt
config.py
test_grammar

external/IntelRDFPMathLib20U1/
external/utf8/
external/libffi-3.2.1/
external/PDCurses-3.4/
external/easysid-version-1.0/
external/hash-library/
external/pcre2-10.10/
external/curl-7.41.0/
external/sqlite-amalgamation-3080803/
external/zlib-1.2.8/
external/bzip2-1.0.6/
external/xz-5.2.1/
external/minijson_writer-master/
external/NaturalDocs/
external/pyparsing-2.0.3/
external/minizip11/
external/SDL2-2.0.3/
external/libsodium-1.0.5/
external/libressl-2.2.4/

external/etc
external/include
external/lib
external/share
1 change: 1 addition & 0 deletions .neonpath
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
before_install:
- which scons || brew install scons
script: scons
sudo: false
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ False

This happens because `0.2` cannot be repesented exactly in binary floating point.

To resolve this problem, Neon uses the [decimal64](https://en.wikipedia.org/wiki/Decimal64_floating-point_format) floating point type, which matches the base 10 that humans use to read and write numbers.
To resolve this problem, Neon uses the [decimal128](https://en.wikipedia.org/wiki/Decimal128_floating-point_format) floating point type, which matches the base 10 that humans use to read and write numbers.

<a name="integer_division"></a>
### Writing division expressions such as `5 / 2` and not expecting integer division
Expand All @@ -92,7 +92,7 @@ Beginners rightly assume that `c` will be `2.5` as the result of the division.
However, the C language definition states that `/` will be *integer* division if both operands are integers.
So, the result in `c` is `2`.

To resolve this problem, the only number type in Neon is decimal64 floating point (called `Number`).
To resolve this problem, the only number type in Neon is decimal128 floating point (called `Number`).
In contexts such as array indexing where integers are expected, values are checked for the presence of a fractional part before trying to use them.

<a name="assignment_equals"></a>
Expand All @@ -111,11 +111,15 @@ In many common systems languages (eg. C, C++, Java, C#), a pointer may hold a "n

To resolve this problem, Neon introduces the idea of a "valid" pointer. A valid pointer is one that has been checked against `NIL` (the null reference) using a special form of the `IF` statement. The resulting valid pointer can be dereferenced without causing a null pointer exception.

VAR node: POINTER TO Node

IF VALID p := node THEN
print(p.value)
END IF
TYPE Node IS RECORD
value: String
END RECORD

FUNCTION output(node: POINTER TO Node)
IF VALID node AS p THEN
print(p->value)
END IF
END FUNCTION

<a name="empty_loop"></a>
### Unintended empty loop with `while (condition);`
Expand All @@ -126,16 +130,20 @@ In C and derived languages, sometimes a loop or conditional is mistakenly writte
while (x < 5);
{
printf("%d\n", x);
x++;
}
```

The trailing `;` on the `while` statement is in fact an empty loop body and the loop is an infinite loop.

To resolve this problem, Neon requires an explicitly terminated block in every compound statement:

WHILE x < 5
print(x)
END
VAR x: Number := 0

WHILE x < 5 DO
print("\(x)")
INC x
END WHILE

<a name="logical_alternative"></a>
### Writing `if a == b or c` (in Python) to test whether `a` is equal to either `b` or `c`
Expand Down
80 changes: 0 additions & 80 deletions SConscript-libffi

This file was deleted.

Loading