FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
solvespace/test/debugtool.cpp at python · KmolYuan/solvespace · GitHub
KmolYuan
solvespace
Repository navigation
Code
Issues
Pull requests
1
(1)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
solvespace
/
test
/
debugtool.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (28 loc) · 1006 Bytes
Breadcrumbs
solvespace
/
test
/
debugtool.cpp
Copy path
File metadata and controls
31 lines (28 loc) · 1006 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
-----------------------------------------------------------------------------
//
Our entry point for exposing various internal mechanisms.
//
//
Copyright 2017 whitequark
//
-----------------------------------------------------------------------------
#
include
"
solvespace.h
"
int
main
(
int
argc,
char
**argv) {
std::vector<std::string> args =
Platform::InitCli
(argc, argv);
if
(args.
size
() ==
3
&& args[
1
] ==
"
expr
"
) {
std::string expr = args[
2
], err;
Expr *e =
Expr::Parse
(expr.
c_str
(), &err);
if
(e ==
NULL
) {
fprintf
(stderr,
"
cannot parse: %s
\n
"
, err.
c_str
());
}
else
{
fprintf
(stderr,
"
%g
\n
"
, e->
Eval
());
}
FreeAllTemporary
();
}
else
{
fprintf
(stderr,
"
Usage: %s <command> <options>
\n
"
, args[
0
].
c_str
());
//
-----------------------------------------------------------------------------> 80 col */
fprintf
(stderr,
R"(
Commands:
expr [expr]
Evaluate an expression.
)"
);
}
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL