Skip to content

Commit

Permalink
[cleanup] Remove declarations now exported by mycpp.
Browse files Browse the repository at this point in the history
Also: more cleanup of unused osh_parse stuff.
  • Loading branch information
Andy Chu committed Jun 20, 2020
1 parent 359fee6 commit 01c3f4a
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 39 deletions.
33 changes: 1 addition & 32 deletions cpp/frontend_flag_spec.cc
Expand Up @@ -2,38 +2,7 @@

#include "frontend_flag_spec.h"
#include "arg_types.h"

// "header" copied from _build/cpp/osh_eval.cc. TODO: mycpp should be able to
// export headers!
namespace args {
args::_Attributes* Parse(runtime_asdl::FlagSpec_* spec, args::Reader* arg_r);
args::_Attributes* ParseLikeEcho(runtime_asdl::FlagSpec_* spec,
args::Reader* arg_r);
args::_Attributes* ParseMore(flag_spec::_FlagSpecAndMore* spec,
args::Reader* arg_r);

// Copied from osh_eval.cc translation
class Reader {
public:
Reader(List<Str*>* argv, List<int>* spids);
void Next();
Str* Peek();
Tuple2<Str*, int> Peek2();
Str* ReadRequired(Str* error_msg);
Tuple2<Str*, int> ReadRequired2(Str* error_msg);
List<Str*>* Rest();
Tuple2<List<Str*>*, List<int>*> Rest2();
bool AtEnd();
int _FirstSpanId();
int SpanId();

List<Str*>* argv;
int i;
int n;
List<int>* spids;
};

} // namespace args
#include "osh_eval.h" // args::Reader, etc.

namespace flag_spec {

Expand Down
2 changes: 0 additions & 2 deletions cpp/postamble.cc
Expand Up @@ -4,10 +4,8 @@

namespace optview {

#ifndef OSH_PARSE // hack for osh_parse, set in build/mycpp.sh
bool Exec::errexit() {
return errexit_->value();
}
#endif // OSH_PARSE

} // namespace optview
1 change: 1 addition & 0 deletions types/more-oil-manifest.txt
Expand Up @@ -5,3 +5,4 @@
./core/process.py
./core/executor.py
./core/shell.py
./osh/builtin_process.py
4 changes: 0 additions & 4 deletions types/oil-slice.sh
Expand Up @@ -42,7 +42,6 @@ osh-eval() {
PYTHONPATH=. bin/osh_eval.py "$@"
}

readonly OSH_PARSE_DEPS='_tmp/osh_parse-deps.txt'
readonly OSH_EVAL_DEPS='_tmp/osh_eval-deps.txt'

deps() {
Expand Down Expand Up @@ -110,8 +109,6 @@ travis-setup() {
# TODO: add stat.py back. Why does it cause errors?
local exclude='vendor|__future__|mylib.py|/stat.py'

osh-parse-deps
egrep -v "$exclude" $OSH_PARSE_DEPS | tee $OSH_PARSE_MANIFEST
osh-eval-deps
egrep -v "$exclude" $OSH_EVAL_DEPS | tee $OSH_EVAL_MANIFEST
}
Expand All @@ -126,7 +123,6 @@ travis() {
return
fi

#typecheck-all $OSH_PARSE_MANIFEST
typecheck-all $OSH_EVAL_MANIFEST
}

Expand Down
1 change: 0 additions & 1 deletion types/osh-eval-manifest.txt
Expand Up @@ -51,7 +51,6 @@
./osh/builtin_meta.py
./osh/builtin_misc.py
./osh/builtin_printf.py
./osh/builtin_process.py
./osh/builtin_pure.py
./osh/cmd_eval.py
./osh/cmd_parse.py
Expand Down

0 comments on commit 01c3f4a

Please sign in to comment.