mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
First stab at adding support for Rust.
This commit is contained in:
@@ -721,6 +721,12 @@ Ruby:
|
|||||||
- Thorfile
|
- Thorfile
|
||||||
- Gemfile
|
- Gemfile
|
||||||
|
|
||||||
|
Rust:
|
||||||
|
type: programming
|
||||||
|
extensions:
|
||||||
|
- .rs
|
||||||
|
- .rc
|
||||||
|
|
||||||
SQL:
|
SQL:
|
||||||
type: data
|
type: data
|
||||||
searchable: false
|
searchable: false
|
||||||
|
|||||||
@@ -55,4 +55,5 @@ text/plain @cu,cxx
|
|||||||
text/x-nimrod @nim
|
text/x-nimrod @nim
|
||||||
text/x-ocaml @ml,mli,mll,mly,sig,sml
|
text/x-ocaml @ml,mli,mll,mly,sig,sml
|
||||||
text/x-nemerle @n
|
text/x-nemerle @n
|
||||||
|
text/x-rust @rs,rc
|
||||||
text/x-scheme @rkt,scm,sls,sps,ss
|
text/x-scheme @rkt,scm,sls,sps,ss
|
||||||
|
|||||||
3
test/fixtures/hello.rs
vendored
Normal file
3
test/fixtures/hello.rs
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
log "Hello, world!";
|
||||||
|
}
|
||||||
@@ -298,6 +298,9 @@ class TestBlob < Test::Unit::TestCase
|
|||||||
|
|
||||||
# https://github.com/dharmatech/agave/blob/master/demos/asteroids.sps
|
# https://github.com/dharmatech/agave/blob/master/demos/asteroids.sps
|
||||||
assert_equal Language['Scheme'], blob("asteroids.sps").language
|
assert_equal Language['Scheme'], blob("asteroids.sps").language
|
||||||
|
|
||||||
|
# https://github.com/graydon/rust
|
||||||
|
assert_equal Language['Rust'], blob("hello.rs").language
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_lexer
|
def test_lexer
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ class TestMime < Test::Unit::TestCase
|
|||||||
assert_equal 'text/plain', Mime.mime_for('.hh')
|
assert_equal 'text/plain', Mime.mime_for('.hh')
|
||||||
assert_equal 'text/plain', Mime.mime_for('.hpp')
|
assert_equal 'text/plain', Mime.mime_for('.hpp')
|
||||||
assert_equal 'text/plain', Mime.mime_for('.kt')
|
assert_equal 'text/plain', Mime.mime_for('.kt')
|
||||||
|
assert_equal 'text/rust', Mime.mime_for('.rs')
|
||||||
|
assert_equal 'text/rust', Mime.mime_for('.rc')
|
||||||
assert_equal 'video/quicktime', Mime.mime_for('.mov')
|
assert_equal 'video/quicktime', Mime.mime_for('.mov')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user