Comments (11)
That commit was for controlling the interpreter with arguments there is currently not support for giving your program arguments. I will update this issue when I implement this.
from pinecone.
ok, i will be sure to check by later
from pinecone.
I'll try and add this myself soon. If you want.
from pinecone.
Go for it. Sorry I haven't added it, I haven't worked on Pinecone much lately.
from pinecone.
on lines 193 and 227 in src/main.cpp I set i (the current command line arg being processed) to argc (the cont of the arguments. To implement command line args, make a vector of strings in the Flags struct (in main.cpp), fill that with all the arguments that come after the -e or -r flag and then expose that as a builtin global variable.
from pinecone.
On second thought, you might want to make the args vector a global, so you can access it in PineconeStdLib.cpp where you can expose it. If you have any trouble implementing it, let me know.
from pinecone.
Currently out, when I get home I'll implement that and then merge.
from pinecone.
i haven't used c++ in a while.
But i gave it a go, from what i can remember.
from pinecone.
It is very much a WIP change.
You're probably better to do it, you know in better detail how you want it to work.
from pinecone.
Your patch looks good but still needs some stuff I will add (as per my comment on the PR)
Also, a different system needs to be created for argument parsing when transpiled. For starters, when transpiling and automatically running the arguments after the -e must be carried along to the executed binary. This can be done by using this function on your args vector and appending it to the executed command around here. You can do that on your patch branch if you want. There is other stuff that's needed in the transpiled code, but that's a bit complicated. I'll look into it later.
from pinecone.
Merged in your PR with my additions and fixes. It now supports command line args both when compiled or interpreted. Documentation for this feature is at the end of the temporary hacks tutorial.
from pinecone.
Related Issues (20)
- Probably a big ask: linking with C/C++ libraries HOT 3
- possible Typo in ErrorHandler.cpp HOT 1
- Will Pinecone ever have HTTP and Websocket support? HOT 3
- Contributor HOT 3
- Is this language supports Android? HOT 1
- Is Pinecone abandoned? HOT 5
- What does the name Pinecone mean? HOT 3
- contribute HOT 2
- Windows style line endings not supported HOT 5
- .
- illegal hardware instruction on macos 10.15.3 HOT 11
- I can do some maintenance HOT 1
- Language Support
- Hello HOT 1
- Hi
- Thank you for your freecodecamp.org post on this! HOT 1
- Interpreter Source code HOT 2
- A Question About the Environment HOT 2
- make command not found HOT 1
- {Bug} Make command not found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinecone.