Skip to content

Commit

Permalink
doc: Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghenshui authored and lhmouse committed Dec 3, 2023
1 parent c053b89 commit cf04820
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion asteria/compiler/expression_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ generate_code(cow_vector<AIR_Node>& code, const Compiler_Options& opts,
return ::rocket::any_of(arg.units,
[](const Expression_Unit& unit) { return unit.clobbers_alt_stack(); });
})) {
// Evaluate argumetns on `alt_stack` directly.
// Evaluate arguments on `alt_stack` directly.
// https://github.com/lhmouse/asteria/issues/136
AIR_Node::S_alt_clear_stack xstart = { };
code.emplace_back(::std::move(xstart));
Expand Down
6 changes: 3 additions & 3 deletions asteria/fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ struct Abstract_Opaque

ASTERIA_COPYABLE_DESTRUCTOR(Abstract_Opaque);

// This function is called to convert this object to a human-readble string.
// This function is called to convert this object to a human-readable string.
virtual
tinyfmt&
describe(tinyfmt& fmt) const = 0;
Expand Down Expand Up @@ -347,7 +347,7 @@ struct Abstract_Function

ASTERIA_COPYABLE_DESTRUCTOR(Abstract_Function);

// This function is called to convert this object to a human-readble string.
// This function is called to convert this object to a human-readable string.
virtual
tinyfmt&
describe(tinyfmt& fmt) const = 0;
Expand Down Expand Up @@ -877,7 +877,7 @@ struct Compiler_Options_template<versionT, 0>
template<>
struct Compiler_Options_fragment<1>
{
// Make single quotes behave similiar to double quotes.
// Make single quotes behave similar to double quotes.
// [useful when parsing JSON5 text]
bool escapable_single_quotes = false;

Expand Down
2 changes: 1 addition & 1 deletion asteria/library/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ std_system_daemonize()

// The CHILD shall create a new session and become its leader. This
// ensures that a later GRANDCHILD will not be a session leader and
// will not unintentially gain a controlling terminal.
// will not unintentionally gain a controlling terminal.
::setsid();

// Create the GRANDCHILD process.
Expand Down
2 changes: 1 addition & 1 deletion asteria/repl/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ struct Handler_again final
}
};

} // namesapce
} // namespace

void
prepare_repl_commands()
Expand Down
2 changes: 1 addition & 1 deletion asteria/runtime/air_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ solidify(AVM_Rod& rod) const
const auto& sp = *reinterpret_cast<const Sparam*>(head->sparam);

// Read a value and throw it. The operand expression must not have
// been empty fof this function.
// been empty for this function.
const auto& val = ctx.stack().top().dereference_readonly();
ctx.stack().pop();
throw Runtime_Error(Runtime_Error::M_throw(), val, sp.sloc);
Expand Down
2 changes: 1 addition & 1 deletion asteria/runtime/argument_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ throw_no_matching_function_call() const
}
caller << ")";

// Get the width of the overload number colomn.
// Get the width of the overload number column.
::rocket::ascii_numput nump;
uint32_t overload_count = (uint32_t) ::rocket::count(this->m_overloads, '|');
nump.put_DU(overload_count);
Expand Down
2 changes: 1 addition & 1 deletion asteria/runtime/runtime_error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ do_insert_frame(Frame_Type type, const Source_Location* sloc_opt, const Value& v
else
this->m_fmt << this->m_value;

// Get the width of the frame number colomn.
// Get the width of the frame number column.
::rocket::ascii_numput nump;
nump.put_DU(this->m_frames.size());
static_vector<char, 24> sbuf(nump.size(), ' ');
Expand Down
4 changes: 2 additions & 2 deletions asteria/value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,14 @@ compare_partial(const Value& other) const
return compare_unordered;
}
else if(qval->m_stor.index() == type_boolean) {
// specialied
// specialized
if(qval->m_stor.as<V_boolean>() < qoth->m_stor.as<V_boolean>())
return compare_less;
else if(qval->m_stor.as<V_boolean>() > qoth->m_stor.as<V_boolean>())
return compare_greater;
}
else if(qval->m_stor.index() == type_string) {
// specialied
// specialized
int r = qval->m_stor.as<V_string>().compare(qoth->m_stor.as<V_string>());
if(r < 0)
return compare_less;
Expand Down
2 changes: 1 addition & 1 deletion doc/standard-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,7 @@ variable. Individual components are categorized into sub-objects.
### `std.filesystem.glob(pattern)`

* Finds all paths that match `pattern`. If a string ends with '/', it should
designate a direcory; otherwise, it should designate a file.
designate a directory; otherwise, it should designate a file.

* Returns matches as an array of strings. If no such path exists, an empty
array is returned.
Expand Down
4 changes: 2 additions & 2 deletions rocket/fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <type_traits> // so many...
#include <iterator> // std::iterator_traits<>, std::begin(), std::end()
#include <utility> // std::swap()
#include <memory> // std::allocator<>, std::addressof(), std::default_delete<>, std::unqiue_ptr, std::shared_ptr
#include <memory> // std::allocator<>, std::addressof(), std::default_delete<>, std::unique_ptr, std::shared_ptr
#include <new> // placement new
#include <atomic> // std::atomic<>
#include <initializer_list> // std::initializer_list<>
Expand Down Expand Up @@ -373,7 +373,7 @@ struct is_input_iterator
{
};

template<typename targetT, typename... candiatesT>
template<typename targetT, typename... candidatesT>
struct is_any_type_of
:
false_type
Expand Down
2 changes: 1 addition & 1 deletion rocket/tinybuf_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class basic_tinybuf_file

if(mode & tinybuf_base::open_write) {
// These flags make sense only when writing to a file. Should
// we throw exceptions if they are specified qith read-only
// we throw exceptions if they are specified with read-only
// access? Maybe.
if(mode & tinybuf_base::open_append) {
flags |= O_APPEND;
Expand Down
2 changes: 1 addition & 1 deletion rocket/xuchar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ do_xfputn_common(::FILE* fp, xwcrtombT&& xwcrtomb, ::mbstate_t& mbst, const xwch
size_t nbytes = 0;
const xwcharT* wptr = ws;
while(wptr != ws + n) {
// Encode one multi-byte chracter.
// Encode one multi-byte character.
char mbcs[MB_LEN_MAX];
int mblen = static_cast<int>(xwcrtomb(mbcs, *wptr, &mbst));

Expand Down
2 changes: 1 addition & 1 deletion test/csv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int main()
assert rows[0] == [ '1', '2', '3' ];
assert rows[1] == [ 'value', 'has', 'a"double', 'quote' ];
assert rows[2] == [ 'and', 'escaped"' ];
assert rows[3] == [ 'a', 'nested', "line\nbreak", 'is', 'acceptible' ];
assert rows[3] == [ 'a', 'nested', "line\nbreak", 'is', 'acceptable' ];
assert rows[4] == [ 'a bc"d e"', '4' ];
///////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion test/test.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
value,has,a"double,quote
and,"escaped"""
a,nested,"line
break",is,acceptible
break",is,acceptable
"a b"c"d e",4

0 comments on commit cf04820

Please sign in to comment.