Skip to content

Commit

Permalink
Fix Typing Errors in Docs, Comments and other Explanations. (lcompile…
Browse files Browse the repository at this point in the history
  • Loading branch information
faze-geek authored Jan 19, 2023
1 parent c109dc5 commit 7a43d1a
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion doc/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Next, `cd` to the root of the repository and run
```

Now, you can launch Visual Studio and open the LFortran folder.
Before the first build you have to set up the `ZLib`-pathes: Go to the CMake-Settings (Project -> CMake Setttings for lfortran) and check `Show advanced variables`. Scroll to the `ZLIB_...` variables and set:
Before the first build you have to set up the `ZLib`-pathes: Go to the CMake-Settings (Project -> CMake Settings for lfortran) and check `Show advanced variables`. Scroll to the `ZLIB_...` variables and set:
- `ZLIB_INCLUDE_DIR` = \<Conda-Installation-Path\>\Library\include
- `ZLIB_LIBRARY_[DEBUG|RELEASE]` = \<Conda-Installation-Path\>\Library\lib\zlib.lib

Expand Down
6 changes: 3 additions & 3 deletions doc/src/rebasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ we will rebasing with main with interactive option `git rebase main -i`.

but first create a backup branch before doing this interactive rebase.

history of your commits will show up on your editor, you have options to do with commits and they are written bellow commits history.
history of your commits will show up on your editor, you have options to do with commits and they are written below commits history.
```bash
pick 132b89e0c Added add.py
pick 75556f15c Added add2.py
Expand Down Expand Up @@ -112,7 +112,7 @@ s 663edf45b refactor
...
```
and it will open windows for every change you made to rename commit's message.
- first window to rename commit `Added add3.py` becasue we squashed the commit after it, and by default the mwssage would be the original message of `Added add3.py` and messages of squashed commits, here i will not change anything i will leave message like that.
- first window to rename commit `Added add3.py` because we squashed the commit after it, and by default the message would be the original message of `Added add3.py` and messages of squashed commits, here i will not change anything i will leave message like that.
```bash
# This is a combination of 2 commits.
# This is the 1st commit message:
Expand Down Expand Up @@ -187,7 +187,7 @@ Added add4.py and edit it
# with '#' will be ignored, and an empty message aborts the commit.
...
```
- third window will be the same as dirst one becasue of squashing two commits to commit:`Added add4.py`, i will leave it with out changing message.
- third window will be the same as dirst one because of squashing two commits to commit:`Added add4.py`, i will leave it with out changing message.

Log now:
```bash
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/print_02.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_nested_lists2():
[ -0.32, 68.81, -55.09],
[ 97.28, -28.2 , -62.61]]]]

# shape = (5, 5, 5), where each element is a string of random alphanumerals and length betweem 0 and 10
# shape = (5, 5, 5), where each element is a string of random alphanumerals and length between 0 and 10
r: list[list[list[str]]] = [[['Io', 'tl', 'bLvjV', 'wjFKQ', 'lY2'], ['Be2l6bqE', 'pQER3utIXA', 'llZBJj5Cdu', 'C8', 'gwTr77PdYR'], ['4M6L', 'ktPdowqERy', 'KSifqTkR', 'ZE2p1N78f1', 'Mi5e87Xw'], ['uwfzqDq9g', 'QaM1s', '', '', 'LB'], ['OJFRY6k', 'iz7Oie', '', 'LUYLF', 'JBND5FuV7l']], [['m', 'WIQBQfV', 'jxjDrqxu', 'kea', 'mu'], ['', 'GI8aOwLMe', 'Y5m8', 'a02Rz', 'xNKCJ'], ['LzkhyiJQHP', 'uzc3xyoXL', 'sKGnYfpRy', '7x', 'WTVKrnPO'], ['TZa6', 'GXRuyRX', 'R', 'JQxS', 'OH'], ['bSVJZ1OQ', 'M', 'I9omlF', 'x7FR', 'XtpL']], [['DKOpK', 'eg8Nz', 'ru', 'Sj', 'YUDxyI'], ['Q5uyhvp', 'Ydx', 'p', 'DLM5RX', 'pwOujxCO'], ['s5GOWnNJV', 'af', 'KAkD', '4IIZK', 'JQK040x'], ['9vF', '9pc7R8v', 'nDReIU7', 'K', 'btn'], ['', 'wVeivkdi', '', '', 'C']], [['vNTtcRXD', 'rsi', 'YsoF7mZD', 'VrPXU50rgA', 'mG7zqN0G'], ['la7cJ', 'M5rLJ8Go', 'gb', 'FjKwYZ7E', 'uSPD'], ['', 'oOa79jWcMx', 'yyAYZZ', 'wbvggXm', 'aE3BkCL4'], ['RdP', 'Hwc0x9RZ', 'sy', '9', 'W1d9xA2BXe'], ['A', '', 'QnK', 'N5tzN', 'ou7Lp']], [['DL68rDF', 'v', 'kQ3Mxm', 'g', '6KTeF4Eo'], ['Hx9', 'Y1IzQm85Z4', '3D8', 'ZLZ5', 'rWn'], ['LtT', 'Dh5B', 'M', 'F', 'QTARbY'], ['Sh', 'WL', 'yvAfWvZSx1', '90yx', 'v'], ['', '7IBW', 'nI', '', '6Cbp5c8RT']]]

print(p)
Expand Down
4 changes: 2 additions & 2 deletions src/libasr/asr_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@ inline int extract_len(ASR::expr_t* len_expr, const Location& loc) {
throw SemanticError(msg, loc);
}
} else {
// An expression is beind used for `len` that cannot be evaluated
// An expression is being used for `len` that cannot be evaluated
a_len = -3;
}
break;
Expand Down Expand Up @@ -2092,7 +2092,7 @@ class ReplaceReturnWithGotoVisitor: public ASR::BaseStmtReplacer<ReplaceReturnWi

// Singleton LabelGenerator so that it generates
// unique labels for different statements, from
// whereever it is called (be it ASR passes, be it
// wherever it is called (be it ASR passes, be it
// AST to ASR transition, etc).
class LabelGenerator {
private:
Expand Down
2 changes: 1 addition & 1 deletion src/libasr/codegen/asr_to_llvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
}
prototype_only = false;

// TODO: handle depencencies across modules and main program
// TODO: handle dependencies across modules and main program

// Then do all the modules in the right order
std::vector<std::string> build_order
Expand Down
2 changes: 1 addition & 1 deletion src/libasr/codegen/asr_to_py.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class ASRToPyVisitor : public ASR::BaseVisitor<ASRToPyVisitor>
// knock off ".h" from the c header filename
pxdf.erase(--pxdf.end());
pxdf.erase(--pxdf.end());
// this is an unfortuante hack, but we have to add something so that the pxd and pyx filenames
// this is an unfortunate hack, but we have to add something so that the pxd and pyx filenames
// are different (beyond just their extensions). If we don't, the cython emits a warning.
// TODO we definitely need to change this somehow because right now this "append _pxd" trick
// exists in two places (bin/lfortran.cpp, and here), which could easily cause breakage.
Expand Down
2 changes: 1 addition & 1 deletion src/libasr/codegen/wasm_to_x64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pushed back onto the stack.
One of the reasons to use stack to pass function arguments is that,
it allows us to define and call functions with any number of parameters.
As registers are limited in number, if we use them to pass function arugments,
As registers are limited in number, if we use them to pass function arguments,
the number of arguments we could pass to a function would get limited by
the number of registers available with the CPU.
Expand Down
2 changes: 1 addition & 1 deletion src/libasr/codegen/wasm_to_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pushed back onto the stack.
One of the reasons to use stack to pass function arguments is that,
it allows us to define and call functions with any number of parameters.
As registers are limited in number, if we use them to pass function arugments,
As registers are limited in number, if we use them to pass function arguments,
the number of arguments we could pass to a function would get limited by
the number of registers available with the CPU.
Expand Down
2 changes: 1 addition & 1 deletion src/libasr/pass/div_to_mul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using ASR::is_a;

/*
This ASR pass replaces divison operation with multiplication
This ASR pass replaces division operation with multiplication
if the divisor can be evaluated to a constant at compile time.
Converts:
Expand Down
2 changes: 1 addition & 1 deletion src/libasr/pass/global_stmts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void pass_wrap_global_stmts_into_function(Allocator &al,
}
unit.m_global_scope->add_symbol(sym_name, down_cast<ASR::symbol_t>(fn));
} else {
// The last item was a statement, create a subroutine (returing
// The last item was a statement, create a subroutine (returning
// nothing)
ASR::asr_t *fn = ASR::make_Function_t(
al, loc,
Expand Down
2 changes: 1 addition & 1 deletion src/libasr/pass/implied_do_loops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ImpliedDoLoopVisitor : public PassUtils::PassVisitor<ImpliedDoLoopVisitor>
bool contains_array;
std::string rl_path;
public:
// Public to surpress a warning
// Public to suppress a warning
ASR::TranslationUnit_t &unit;

ImpliedDoLoopVisitor(Allocator &al, ASR::TranslationUnit_t& unit,
Expand Down
10 changes: 5 additions & 5 deletions src/libasr/pass/inline_function_calls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class InlineFunctionCallVisitor : public PassUtils::PassVisitor<InlineFunctionCa

ASR::symbol_t* called_sym = x.m_name;

// TODO: Hanlde later
// TODO: Handle later
// ASR::symbol_t* called_sym_original = x.m_original_name;

ASR::FunctionCall_t& xx = const_cast<ASR::FunctionCall_t&>(x);
Expand Down Expand Up @@ -268,7 +268,7 @@ class InlineFunctionCallVisitor : public PassUtils::PassVisitor<InlineFunctionCa

// The following loop inserts the function's local symbols i.e.,
// the ones other than the arguments.
// exprs_to_be_visited temporarily stores the initilisation expression as well.
// exprs_to_be_visited temporarily stores the initialisation expression as well.
for( auto& itr : func->m_symtab->get_scope() ) {
if( startswith(itr.first, "~empty_block") ) {
set_empty_block(current_scope, func->base.base.loc);
Expand Down Expand Up @@ -309,7 +309,7 @@ class InlineFunctionCallVisitor : public PassUtils::PassVisitor<InlineFunctionCa
}

// At this point arg2value map is ready with all the variables.
// Now, we visit the initilisation expression of the local variables
// Now, we visit the initialisation expression of the local variables
// and replace the variables present in those expressions with the ones
// in the current scope. See, `visit_Var` to know how replacement occurs.
for( size_t i = 0; i < exprs_to_be_visited.size() && success; i++ ) {
Expand Down Expand Up @@ -357,7 +357,7 @@ class InlineFunctionCallVisitor : public PassUtils::PassVisitor<InlineFunctionCa
label_generator->add_node_with_unique_label((ASR::asr_t*) block_call,
block_call_label);
return_replacer.set_goto_label(block_call_label);
// If duplication is successfull then fill the
// If duplication is successful then fill the
// pass result with assignment statements
// (for local variables in the loop just below)
// and the function body (the next loop).
Expand Down Expand Up @@ -385,7 +385,7 @@ class InlineFunctionCallVisitor : public PassUtils::PassVisitor<InlineFunctionCa
}

if (!success) {
// If not successfull then delete all the local variables
// If not successful then delete all the local variables
// created for the purpose of inlining the current function call.
for( auto& itr : arg2value ) {
ASR::Variable_t* auxiliary_var = ASR::down_cast<ASR::Variable_t>(itr.second);
Expand Down
2 changes: 1 addition & 1 deletion src/lpython/semantics/python_ast_to_asr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ class CommonVisitor : public AST::BaseVisitor<Struct> {
tmp = make_call_helper(al, fn_div, current_scope, args, "_lpython_floordiv", loc);
return;

} else { // real divison in python using (`/`)
} else { // real division in python using (`/`)
ASR::ttype_t* left_type = ASRUtils::expr_type(left);
ASR::ttype_t* right_type = ASRUtils::expr_type(right);
ASR::dimension_t *m_dims_left = nullptr, *m_dims_right = nullptr;
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/impure/lfortran_intrinsic_sin_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
* z = (z-x[i])*2**24
*
*
* y[] ouput result in an array of double precision numbers.
* y[] output result in an array of double precision numbers.
* The dimension of y[] is:
* 24-bit precision 1
* 53-bit precision 2
* 64-bit precision 2
* 113-bit precision 3
* The actual value is the sum of them. Thus for 113-bit
* precison, one may have to do something like:
* precision, one may have to do something like:
*
* long double t,w,r_head, r_tail;
* t = (long double)y[2] + (long double)y[1];
Expand Down
8 changes: 4 additions & 4 deletions src/runtime/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def mode(x: list[i32]) -> i32:
@overload
def variance(x: list[f64]) -> f64:
"""
Returns the varience of a data sequence of numbers
Returns the variance of a data sequence of numbers
"""
n: i32
n = len(x)
Expand All @@ -264,7 +264,7 @@ def variance(x: list[f64]) -> f64:
@overload
def variance(x: list[i32]) -> f64:
"""
Returns the varience of a data sequence of numbers
Returns the variance of a data sequence of numbers
"""
n: i32
n = len(x)
Expand Down Expand Up @@ -298,7 +298,7 @@ def stdev(x: list[i32]) -> f64:
@overload
def pvariance(x: list[f64]) -> f64:
"""
Returns the population varience of a data sequence of numbers
Returns the population variance of a data sequence of numbers
"""
n: i32
n = len(x)
Expand All @@ -316,7 +316,7 @@ def pvariance(x: list[f64]) -> f64:
@overload
def pvariance(x: list[i32]) -> f64:
"""
Returns the population varience of a data sequence of numbers
Returns the population variance of a data sequence of numbers
"""
n: i32
n = len(x)
Expand Down
2 changes: 1 addition & 1 deletion src/tests/doctest.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
// =================================================================================================

// both the header and the implementation suppress all of these,
// so it only makes sense to aggregrate them like so
// so it only makes sense to aggregate them like so
#define DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH \
DOCTEST_CLANG_SUPPRESS_WARNING_PUSH \
DOCTEST_CLANG_SUPPRESS_WARNING("-Wunknown-pragmas") \
Expand Down
2 changes: 1 addition & 1 deletion tests/dictionary1.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def test_Dict():
x: dict[i32, i32]
x = {1: 2, 3: 4}
# x = {1: "2", "3": 4} -> sematic error
# x = {1: "2", "3": 4} -> semantic error

y: dict[str, i32]
y = {"a": -1, "b": -2}
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/asr-dictionary1-a105a36.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"basename": "asr-dictionary1-a105a36",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/dictionary1.py",
"infile_hash": "5139db2ff83388c2ad73d4a4f2d35ee323e9622f87338f6108443295",
"infile_hash": "2d9f15b746aa8185afb3f2dc6415c20a7edccc8e711df1b323178d94",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-dictionary1-a105a36.stdout",
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/asr-print_02-afbe092.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"basename": "asr-print_02-afbe092",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/../integration_tests/print_02.py",
"infile_hash": "51c244e84b614bbe3d536fd561b1016eb904fb766aeb67e521e9fe65",
"infile_hash": "c2a1fef856c4162154056d5aaea2acdf325f21bf8e43703f71d71fac",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-print_02-afbe092.stdout",
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/ast-dictionary1-1a7e00a.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"basename": "ast-dictionary1-1a7e00a",
"cmd": "lpython --show-ast --no-color {infile} -o {outfile}",
"infile": "tests/dictionary1.py",
"infile_hash": "5139db2ff83388c2ad73d4a4f2d35ee323e9622f87338f6108443295",
"infile_hash": "2d9f15b746aa8185afb3f2dc6415c20a7edccc8e711df1b323178d94",
"outfile": null,
"outfile_hash": null,
"stdout": "ast-dictionary1-1a7e00a.stdout",
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/pass_print_list-print_02-d2853f6.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"basename": "pass_print_list-print_02-d2853f6",
"cmd": "lpython --pass=print_list --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/../integration_tests/print_02.py",
"infile_hash": "51c244e84b614bbe3d536fd561b1016eb904fb766aeb67e521e9fe65",
"infile_hash": "c2a1fef856c4162154056d5aaea2acdf325f21bf8e43703f71d71fac",
"outfile": null,
"outfile_hash": null,
"stdout": "pass_print_list-print_02-d2853f6.stdout",
Expand Down

0 comments on commit 7a43d1a

Please sign in to comment.