Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJerle committed May 13, 2021
2 parents 66b43d7 + 04f9faf commit ca0b164
Show file tree
Hide file tree
Showing 12 changed files with 261 additions and 137 deletions.
22 changes: 22 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}\\lwjson\\src\\include",
"${workspaceFolder}\\dev\\VisualStudio",
"${workspaceFolder}"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:\\MinGW\\bin\\gcc.exe",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "windows-gcc-x86"
}
],
"version": 4
}
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "g++.exe - Launch program",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}\\Debug\\output.exe",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "g++.exe - Launch program"
}
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"lwjson.h": "c"
}
}
39 changes: 39 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "Build project",
"command": "C:\\MinGW\\bin\\gcc.exe",
"args": [
"-g",
"${workspaceFolder}\\lwjson\\src\\lwjson\\*.c",
"${workspaceFolder}\\dev\\VisualStudio\\main.c",
"${workspaceFolder}\\test\\*.c",
"-I${workspaceFolder}\\dev\\VisualStudio\\",
"-I${workspaceFolder}\\lwjson\\src\\include\\",
"-o",
"${workspaceFolder}\\Debug\\output.exe"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "shell",
"label": "Run built code",
"command": "${workspaceFolder}\\Debug\\output.exe",
"problemMatcher": [],
"dependsOn": [
"Build project"
]
}
]
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Develop

## 1.4.0

- Add support with input string with length specifier
- Add VSCode project for Win32 compilation

## 1.3.0

- Added support for inline `/* */` comments
Expand Down
2 changes: 1 addition & 1 deletion dev/VisualStudio/lwjson_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* This file is part of LwJSON - Lightweight JSON format parser.
*
* Author: Tilen MAJERLE <[email protected]>
* Version: v1.3.0
* Version: v1.4.0
*/
#ifndef LWJSON_HDR_OPTS_H
#define LWJSON_HDR_OPTS_H
Expand Down
6 changes: 4 additions & 2 deletions lwjson/src/include/lwjson/lwjson.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* This file is part of LwJSON - Lightweight JSON format parser.
*
* Author: Tilen MAJERLE <[email protected]>
* Version: v1.3.0
* Version: v1.4.0
*/
#ifndef LWJSON_HDR_H
#define LWJSON_HDR_H
Expand Down Expand Up @@ -103,9 +103,10 @@ typedef struct lwjson_token {
*/
typedef enum {
lwjsonOK = 0x00, /*!< Function returns successfully */
lwjsonERR,
lwjsonERR, /*!< Generic error message */
lwjsonERRJSON, /*!< Error JSON format */
lwjsonERRMEM, /*!< Memory error */
lwjsonERRPAR, /*!< Parameter error */
} lwjsonr_t;

/**
Expand All @@ -122,6 +123,7 @@ typedef struct {
} lwjson_t;

lwjsonr_t lwjson_init(lwjson_t* lw, lwjson_token_t* tokens, size_t tokens_len);
lwjsonr_t lwjson_parse_ex(lwjson_t* lw, const void* json_data, size_t len);
lwjsonr_t lwjson_parse(lwjson_t* lw, const char* json_str);
const lwjson_token_t* lwjson_find(lwjson_t* lw, const char* path);
const lwjson_token_t* lwjson_find_ex(lwjson_t* lw, const lwjson_token_t* token, const char* path);
Expand Down
2 changes: 1 addition & 1 deletion lwjson/src/include/lwjson/lwjson_opt.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* This file is part of LwJSON - Lightweight JSON format parser.
*
* Author: Tilen MAJERLE <[email protected]>
* Version: v1.3.0
* Version: v1.4.0
*/
#ifndef LWJSON_HDR_OPT_H
#define LWJSON_HDR_OPT_H
Expand Down
2 changes: 1 addition & 1 deletion lwjson/src/include/lwjson/lwjson_opts_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* This file is part of LwJSON - Lightweight JSON format parser.
*
* Author: Tilen MAJERLE <[email protected]>
* Version: v1.3.0
* Version: v1.4.0
*/
#ifndef LWJSON_HDR_OPTS_H
#define LWJSON_HDR_OPTS_H
Expand Down
Loading

0 comments on commit ca0b164

Please sign in to comment.