Bernd Amend
0f37802aba
move namespace json into the chaiscript namespace #486
2021-05-24 23:31:31 +02:00
Bernd Amend
cff6a0aced
change .clang-format and reformat code with clang-format 11
...
I initially tried to use the existing .clang-format file,
but it does not match the code style (at least with clang-format 11)
and the formatting is not consistent across files.
Therefore, I decided to rewrite the .clang-format with some personal
preferences.
Used command
find . -iname "*.hpp" -o -iname "*.cpp" | xargs clang-format -i -style=file
2021-05-24 10:44:15 +02:00
Bernd Amend
bd933592a9
hash.hpp: explicitly cast to uint32_t
2021-05-22 13:51:24 +02:00
Bernd Amend
c47b9e3b0d
replace const std::string_view with std::string_view
2021-05-22 13:40:32 +02:00
Rob Loach
c7fcc9f7d9
Fix stack_vector.pop_back() pre-decrementing
...
Fixes #547 , found by @balint-luko.
2021-01-07 13:15:47 -05:00
Jason Turner
a880319db8
Merge branch 'develop' into best_practices
2018-05-30 08:30:29 -06:00
Jason Turner
c19705da5d
Merge remote-tracking branch 'origin/c++17' into develop
2018-05-29 13:21:09 -06:00
Jason Turner
2d762c8be3
Update copyrights to 2018
2018-05-29 11:51:15 -06:00
Jason Turner
6a8541971e
Merge pull request #410 from arcoRocks/patch-3
...
Fix for #409
2018-03-01 10:44:45 -07:00
arcoRocks
e23c2bb04f
fix for #413
2018-02-20 16:23:45 +01:00
arcoRocks
3e1916a8d5
fix for #413
2018-02-19 13:31:38 +01:00
arcoRocks
88042c7958
Fix for #409
2018-02-15 14:33:38 +01:00
Glen Fraser
783b8b7361
In to_json(), maintain the "type" of empty maps and vectors
...
- fix issue #399 .
- make to_json() with an empty Map, Vector or Dynamic_Object return a
similar/compatible type (JSON object or array), rather than "null".
- include the fix for #381 (to_json() support for null values), so
that can also be unit tested.
2018-01-11 19:44:27 +01:00
Jason Turner
6bfc130b73
Fix pull from develop, fix gcc warnings
2017-12-16 11:50:32 -07:00
Jason Turner
db72ab626f
Consolidate hand-rolled flat maps
2017-11-24 22:20:52 -07:00
Jason Turner
48e5a46cbd
Move to QuickFlatMap from manual vector map thing
2017-11-23 22:38:15 -07:00
Jason Turner
8b523c73b8
Merge remote-tracking branch 'origin/develop' into best_practices
2017-11-21 15:34:04 -07:00
Jason Turner
680f9b9242
Fix variable redeclaration from last merge conflict fix.
2017-11-21 14:06:42 -07:00
Jason Turner
e97d3723df
Merge branch 'develop' into develop
2017-11-21 13:54:54 -07:00
Jason Turner
28a59d2a6e
Avoid creating vectors when possible
2017-11-16 09:10:48 -07:00
Glen Fraser
79d985d6ff
Fix JSON parsing for floats with negative exponents
...
- also add unit tests to cover some broken (now fixed) cases.
2017-10-24 20:10:50 +02:00
dinghram
1541cce1d9
Change long to int64_t to remove OS ambiguity
...
Linux compilers interpret "long" as 64 bit, Visual Studio on Windows interprets "long" as 32 bit. In order to remove ambiguity, from_json should use int64_t rather than long when parsing integers.
2017-10-03 08:43:01 -06:00
Jason Turner
8e590387f1
Merge branch 'constexpr' into c++17
2017-09-20 17:05:31 -06:00
Jason Turner
c5a9cab3dd
Simple cleanup for string comparisons
2017-09-20 15:34:19 -06:00
Jason Turner
f9a1784b9b
Move json.hpp to variant
2017-08-25 19:48:30 -06:00
Jason Turner
4275ec6878
Make it easier to swap around some hashing algorithms
2017-08-25 15:31:24 -06:00
Jason Turner
dce9e17c34
More string_view tweaks
2017-08-25 14:49:44 -06:00
Jason Turner
e49df4c54d
Move the parser to string_view
2017-08-25 11:17:47 -06:00
Jason Turner
ddb2f352cd
Initial simple application of constexpr to API
2017-08-17 11:27:14 -06:00
Jason Turner
ca8f78ff89
JSON noexcept updates
2017-08-10 22:22:13 -06:00
Jason Turner
e07cd88659
Add noexcept where appropriate
...
This modifies no logic, it simply adds the keyword `noexcept`
I believe this is 100% correct. It calls methods that are not
guaranteed to be `noexcept`, such as `operator[]` but have
no logically way of throwing.
2017-07-22 20:33:30 -06:00
Jason Turner
ef333e491a
remove existing constexpr
2017-07-20 21:16:54 -06:00
Jason Turner
b42316a275
More careful with json errors
2017-07-19 13:19:17 -06:00
Jason Turner
d8da295e40
Check string accesses during JSON parsing
2017-07-19 10:47:17 -06:00
Glen Fraser
491b95099d
In JSONParser::parse_number(), only allow a single '-' at start
...
- also, don't allow multiple '.' decimal points. Add unit tests to
cover these cases.
2017-03-14 13:01:09 +01:00
Glen Fraser
561c5bc981
Handle negative numbers in JSONParse::parse_number
...
- fix issue #334 , where negative numbers loaded from JSON were being
parsed as 0.
- add unit tests to cover these cases.
2017-03-14 12:01:51 +01:00
Jason Turner
064a385a64
Merge branch 'develop' of github.com:ChaiScript/ChaiScript into develop
2017-02-22 15:56:04 -07:00
Jason Turner
283785faaf
Add PVS Studio and address some issues it found
2017-02-22 15:18:56 -07:00
Jason Turner
87f1242ed4
Update copyrights to 2017
2017-02-15 15:55:40 -07:00
Jason Turner
24352c62e8
Some clang specific fixes / warnings
2017-02-02 08:00:57 -08:00
Jason Turner
c82c9ccb6e
Revert "Fix parsing of negative numbers"
...
This reverts commit 83b7973cb885af928e36195a7cbc6ab8f04a93b6.
2017-02-01 06:18:14 -08:00
Jason Turner
83b7973cb8
Fix parsing of negative numbers
2017-01-31 15:41:21 -08:00
Jason Turner
ce62706fea
Clean up warnings
...
* msvc
* pvs-studio
2016-12-06 10:31:36 -07:00
Jason Turner
d6d50478de
Make constexpr members const
2016-12-03 07:59:06 -07:00
Jason Turner
0dea62dd54
Finish removing runtime string comparisons
...
* Now virtually all parser string work is done at compile time
* Continuing the work started by @niXman
2016-12-02 23:01:57 -07:00
Jason Turner
95e119fffe
Merge github.com:niXman/ChaiScript into develop
2016-12-01 14:03:56 -07:00
Stan
7f4af72244
Added add_class overload for scoped enums.
2016-11-23 20:39:21 +01:00
niXman
1ea91faf52
parser optimization Three
2016-11-08 01:11:46 +02:00
Jason Turner
b1f1803759
Some cleanups found by clang's analyzer
2016-10-28 14:53:01 -06:00
Jason Turner
b0f07cbe5d
Merge branch 'develop' into cleanups_and_reworkds
2016-06-29 16:11:00 -06:00