Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
SrijaVuppala295 committed Nov 8, 2024
1 parent 08721f7 commit 537a564
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/components/code-editor/code-editor.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@
<option value="java">Java</option>
<option value="python">Python</option>
<option value="javascript">JavaScript</option>
<option value="html">HTML</option>
<option value="typescript">TypeScript</option>
<option value="ruby">Ruby</option>
<option value="php">PHP</option>
<option value="go">Go</option>
<option value="swift">Swift</option>
<option value="kotlin">Kotlin</option>
</select>

</div>
<div class="app-ace-editor" #editor></div>
</div>
28 changes: 28 additions & 0 deletions src/app/components/code-editor/code-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,28 @@ using namespace std;
int main() {
cout << "Hello, C++!" << endl;
return 0;
}`,
typescript: `function example(): void {
console.log("Hello, TypeScript!");
}`,
ruby: `def example
puts "Hello, Ruby!"
end`,
php: `<?php
echo "Hello, PHP!";
?>`,
go: `package main
import "fmt"
func main() {
fmt.Println("Hello, Go!")
}`,
swift: `import Foundation
print("Hello, Swift!")`,
kotlin: `fun main() {
println("Hello, Kotlin!")
}`,
};

Expand All @@ -56,6 +78,12 @@ int main() {
java: 'java',
html: 'html',
cpp: 'c_cpp',
typescript: 'typescript',
ruby: 'ruby',
php: 'php',
go: 'golang',
swift: 'swift',
kotlin: 'kotlin',
};

ngAfterViewInit(): void {
Expand Down

0 comments on commit 537a564

Please sign in to comment.